File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -76,13 +76,6 @@ Then you can define it as a service as follows:
76
76
'AppBundle\Controller\HelloController'
77
77
));
78
78
79
- .. caution ::
80
-
81
- If you are managing your routes with PHP annotation, you may need to add an
82
- ``@Route `` annotation to the controller-class which specifies its service
83
- ID. If you don't, the system may try to construct your controller without
84
- any arguments. See the `FrameworkExtraBundle documentation `_ for details.
85
-
86
79
Referring to the Service
87
80
------------------------
88
81
@@ -126,7 +119,8 @@ the route ``_controller`` value:
126
119
.. tip ::
127
120
128
121
You can also use annotations to configure routing using a controller
129
- defined as a service. See the `FrameworkExtraBundle documentation `_ for
122
+ defined as a service. Make sure you specify the service ID in the
123
+ ``@Route `` annotation. See the `FrameworkExtraBundle documentation `_ for
130
124
details.
131
125
132
126
.. tip ::
@@ -345,4 +339,4 @@ controller:
345
339
346
340
.. _`Controller class source code` : https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
347
341
.. _`base Controller class` : https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
348
- .. _`FrameworkExtraBundle documentation` : https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/routing.html
342
+ .. _`FrameworkExtraBundle documentation` : https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/routing.html#controller-as-service
You can’t perform that action at this time.
0 commit comments