diff --git a/controller.rst b/controller.rst index 7866a97818b..6dc2bea4f88 100644 --- a/controller.rst +++ b/controller.rst @@ -178,7 +178,8 @@ These are used for rendering templates, sending emails, querying the database an any other "work" you can think of. If you need a service in a controller, type-hint an argument with its class -(or interface) name. Symfony will automatically pass you the service you need:: +(or interface) name. Symfony will automatically pass you the service you need. +Make sure to :doc:`register the controller as a service or tag it with 'controller.service_arguments' `:: use Psr\Log\LoggerInterface; use Symfony\Component\HttpFoundation\Response;