We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6119ac9 commit 72a0685Copy full SHA for 72a0685
controller.rst
@@ -338,6 +338,13 @@ controller's service config:
338
You can of course also use normal :ref:`constructor injection <services-constructor-injection>`
339
in your controllers.
340
341
+.. caution::
342
+
343
+ You can *only* pass *services* to your controller arguments in this way. It's
344
+ not possible, for example, to pass a service parameter as a controller argument.
345
+ If you need a parameter, use the ``$this->getParameter('kernel.debug')`` shortcut
346
+ or pass the value through your controller's ``__construct()`` method.
347
348
For more information about services, see the :doc:`/service_container` article.
349
350
.. _controller-service-arguments-tag:
0 commit comments