8000
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.
2 parents 5476202 + 656980b commit d7ee5d5Copy full SHA for d7ee5d5
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