Feature #89139

Epic #83968: PSR-11 Initiative

Symfony Console Commands should be able to use dependency injection

Added by Benjamin Franzke 9 days ago. Updated 9 days ago.

Status:
Under Review
Priority:
Should have
Category:
CLI
Start date:
2019-09-11
Due date:
% Done:

0%

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.

History

#1 Updated by Gerrit Code Review 9 days ago

  • Status changed from New to Under Review

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61630

#2 Updated by Gerrit Code Review 9 days ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61630

Also available in: Atom PDF