8000 [Console] Command lazy loading by chalasr · Pull Request #8502 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Console] Command lazy loading #8502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 29, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Break long lines and add blank lines after RST directives
  • Loading branch information
javiereguiluz authored Oct 13, 2017
commit a6aac8f20ef3d9c804770899747e7a310060b5a1
6 changes: 4 additions & 2 deletions console/commands_as_services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,13 @@ Or set the ``command`` attribute on the ``console.command`` tag in your service
->addTag('console.command', array('command' => 'app:sunshine'))
;

That's it. In one way or another, the ``SunshineCommand`` will be instantiated only when
the ``app:sunshine`` command is actually called.
That's it. In one way or another, the ``SunshineCommand`` will be instantiated
only when the ``app:sunshine`` command is actually called.

.. note::

You don't need to call ``setName()`` for configuring the command when it is lazy.

.. caution::

Calling the ``list`` command requires to load all commands, lazy ones included.
0