8000 [Console] Command as service by gnugat · Pull Request #3621 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Console] Command as service #3621

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 9 commits into from
Mar 24, 2014
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
Added @lsmith77 and @dbu use cases
  • Loading branch information
Loïc Chardonnet committed Mar 1, 2014
commit cdd534a806ba45020c076dda70d2128be1cb3b69
5 changes: 5 additions & 0 deletions cookbook/console/console_command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ the ``console.command`` tag:

* if you need your commands to be defined somewhere else than in the
``Command`` folder;
* if you need to register the command conditionally (depending on the
environment or presence of some dependencies);
* ou want to reuse the command with a different service or different
configuration, without having to extend the command - you could just
define a second service with the same class;
* if you need to access services or configuration parameters in the
``configure`` method.

Expand Down
0