From eb2ce88c6d6a09ec4d541b16f6d2c80af1e4e898 Mon Sep 17 00:00:00 2001 From: Ahmed Bouras <48674780+ahmedbrs@users.noreply.github.com> Date: Sun, 13 Mar 2022 16:04:04 +0100 Subject: [PATCH] Update service_container.rst Hi ! If I'm not mistaking, we should extending the AbstractController to add a service in a controller. --- service_container.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service_container.rst b/service_container.rst index ff1758b1bb3..3dea1fe9825 100644 --- a/service_container.rst +++ b/service_container.rst @@ -32,10 +32,11 @@ service's class or interface name. Want to :doc:`log ` something? No p namespace App\Controller; use Psr\Log\LoggerInterface; + use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; - class ProductController + class ProductController extends AbstractController { /** * @Route("/products")