Skip to content

Commit e1521a0

Browse files
authored
Update controllers.rst
Do not add annotation routing configuration if your project uses Symfony Flex since the recipe already created the annotations.yaml file with the config inside.
1 parent 89e69ae commit e1521a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

best_practices/controllers.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ this suffix is neither required nor recommended, so you can safely remove it.
4747
Routing Configuration
4848
---------------------
4949

50-
To load routes defined as annotations in your controllers, add the following
51-
configuration to the main routing configuration file:
50+
To load routes defined as annotations in your controllers and if you are not using Symfony Flex, add the following
51+
configuration to the annotation routing configuration file:
5252

5353
.. code-block:: yaml
5454
55-
# config/routes.yaml
55+
# config/routes/annotations.yaml
5656
controllers:
57-
resource: '../src/Controller/'
57+
resource: '../../src/Controller/'
5858
type: annotation
5959
6060
This configuration will load annotations from any controller stored inside the

0 commit comments

Comments
 (0)