Skip to content

Commit bac0778

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: Updated controller best practices
2 parents 51e326c + a8aba6a commit bac0778

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

best_practices/controllers.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ 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, run
51+
``composer require doctrine/annotations``. Thanks to the :ref:`Flex recipe <symfony-flex>`,
52+
a ``config/routes/annotations.yaml`` file will be created:
5253

5354
.. code-block:: yaml
5455
55-
# config/routes.yaml
56+
# config/routes/annotations.yaml
5657
controllers:
57-
resource: '../src/Controller/'
58+
resource: '../../src/Controller/'
5859
type: annotation
5960
6061
This configuration will load annotations from any controller stored inside the

0 commit comments

Comments
 (0)