8000 Fix · symfony/symfony-docs@4ac5da7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ac5da7

Browse files
committed
Fix
1 parent 88a4806 commit 4ac5da7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

controller.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ For more information on routing, see :doc:`/routing`.
117117
single: Controller; Base controller class
118118

119119
.. _anchor-name:
120-
:ref:`The Base Controller Classes & Services <the-base-controller-class-services>`
120+
:ref:`The Base Controller Classes & Services <the-base-controller-class-services>`
121121

122122
The Base Controller Classes & Services
123123
--------------------------------------
@@ -136,8 +136,9 @@ with a service object that can render Twig templates, another that can
136136
log messages and many more.
137137

138138
On the other hand, the ``AbstractController`` prevents you from accessing the
139-
**service container**. This forces you to write a code more robust by
140-
forcing you to explicitly define your dependencies.
139+
**service container**. When you need an external dependency, this forces you to
140+
write a code more robust as you have to explicitly define your dependencies by
141+
using :doc:`the controller as a service </controller/service>`.
141142

142143
Add the ``use`` statement atop the ``Controller`` class and then modify
143144
``LuckyController`` to extend it::

0 commit comments

Comments
 (0)
0