Skip to content

Commit 986cdd0

Browse files
committed
minor #13340 Remove caution section about bind scalar controller arguments (Ioni14)
This PR was merged into the 4.4 branch. Discussion ---------- Remove caution section about bind scalar controller arguments This caution section is no longer relevant since 4.1 with symfony/symfony@2c7198c . Commits ------- 717547b Remove caution section about bind scalar controller arguments
2 parents 14cad70 + 717547b commit 986cdd0

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

controller.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,6 @@ the argument by its name:
277277
Like with all services, you can also use regular :ref:`constructor injection <services-constructor-injection>`
278278
in your controllers.
279279

280-
.. caution::
281-
282-
You can *only* pass *services* to your controller arguments in this way. It's not
283-
possible, for example, to pass a config parameter as a controller argument,
284-
even by using ``bind``. If you need a parameter, use the ``$this->getParameter('kernel.debug')``
285-
shortcut or pass the value through your controller's ``__construct()`` method
286-
and specify its value with ``bind``.
287-
288280
For more information about services, see the :doc:`/service_container` article.
289281

290282
Generating Controllers

0 commit comments

Comments
 (0)