From 717547bd0d3e9908615e9e84f77f0c7fcdb11f57 Mon Sep 17 00:00:00 2001 From: Thomas Talbot Date: Fri, 13 Mar 2020 19:24:18 +0100 Subject: [PATCH] Remove caution section about bind scalar controller arguments --- controller.rst | 8 -------- 1 file changed, 8 deletions(-) diff --git a/controller.rst b/controller.rst index 6c8417e14ac..ee546a151f4 100644 --- a/controller.rst +++ b/controller.rst @@ -277,14 +277,6 @@ the argument by its name: Like with all services, you can also use regular :ref:`constructor injection ` in your controllers. -.. caution:: - - You can *only* pass *services* to your controller arguments in this way. It's not - possible, for example, to pass a config parameter as a controller argument, - even by using ``bind``. If you need a parameter, use the ``$this->getParameter('kernel.debug')`` - shortcut or pass the value through your controller's ``__construct()`` method - and specify its value with ``bind``. - For more information about services, see the :doc:`/service_container` article. Generating Controllers