Actions
Feature #89139
closedEpic #83968: PSR-11 Initiative
Symfony Console Commands should be able to use dependency injection
Status:
Closed
Priority:
Should have
Assignee:
Category:
CLI
Target version:
Start date:
2019-09-11
Due date:
% Done:
100%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
The CommandRegistry instantiates all Commands with a constructor argument (command name).
That means GeneralUtility::makeInstance can not offload to the dependency injection container.
Furthermore all commands are instantiates (always), independent from the command that is actually executed.
It should be made possible to use dependency injection for commands.
Bonus would be registration of console commands via DI tags.
Actions