Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4ac5da7

Browse filesBrowse files
committed
Fix
1 parent 88a4806 commit 4ac5da7
Copy full SHA for 4ac5da7

File tree

1 file changed

+4
-3
lines changed
Filter options

1 file changed

+4
-3
lines changed

‎controller.rst

Copy file name to clipboardExpand all lines: controller.rst
+4-3Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.