Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit6984951

Browse files
committed
minor#10554 Minor reword of AbstractController vs Controller (javiereguiluz)
This PR was merged into the 3.4 branch.Discussion----------Minor reword of AbstractController vs ControllerThisfixes#9926.Commits-------5bee7d9 Minor reword of AbstractController vs Controller
2 parentsec537cd +5bee7d9 commit6984951

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎controller.rst‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp