File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -147,10 +147,12 @@ and many others that you'll learn about next.
147147.. tip ::
148148
149149 You can extend either ``Controller `` or ``AbstractController ``. The difference
150- is that when you extend ``AbstractController ``, you can't access services directly
151- via ``$this->get() `` or ``$this->container->get() ``. This forces you to write
152- more robust code to access services. But if you *do * need direct access to the
153- container, using ``Controller `` is fine.
150+ is that when you extend ``AbstractController ``, you can't access to your services
151+ via ``$this->get() `` or ``$this->container->get() ``, only to a set of common
152+ Symfony services. This forces you to write more robust code to access services.
153+
154+ Moreover, in Symfony 4.2 ``Controller `` was deprecated in favor of
155+ ``AbstractController ``, so using the latter will make your apps future-proof.
154156
155157.. versionadded :: 3.3
156158 The ``AbstractController `` class was added in Symfony 3.3.
You can’t perform that action at this time.
0 commit comments