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 4143835

Browse filesBrowse files
Maintained a note about ContainerAwareCommand being deprecated
1 parent f3e8f0e commit 4143835
Copy full SHA for 4143835

File tree

Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-0
lines changed

‎console/commands_as_services.rst

Copy file name to clipboardExpand all lines: console/commands_as_services.rst
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ works! You can call the ``app:sunshine`` command and start logging.
6060
work (e.g. making database queries), as that code will be run, even if you're using
6161
the console to execute a different command.
6262

63+
.. note::
64+
65+
In previous Symfony versions, you could make the command class extend from
66+
:class:`Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand` to
67+
get services via ``$this->getContainer()->get('SERVICE_ID')``. This is
68+
deprecated in Symfony 4.2 and it won't work in future Symfony versions.
69+
6370
.. _console-command-service-lazy-loading:
6471

6572
Lazy Loading

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.