Feature #89139

Epic #83968: PSR-11 Initiative

Symfony Console Commands should be able to use dependency injection

Added by Benjamin Franzke about 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Category:
CLI
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.


Related issues

Related to TYPO3 Core - Bug #90450: Defining an alias for a command overwrites its original command nameClosed2020-02-20

Actions
Related to TYPO3 Core - Task #91534: Remove deprecated Commands.php loadingClosedBenjamin Franzke2020-05-29

Actions
#1

Updated by Gerrit Code Review about 2 years 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 about 2 years 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

#3

Updated by Gerrit Code Review almost 2 years ago

Patch set 14 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

#4

Updated by Gerrit Code Review almost 2 years ago

Patch set 15 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

#5

Updated by Gerrit Code Review almost 2 years ago

Patch set 16 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

#6

Updated by Gerrit Code Review over 1 year ago

Patch set 17 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

#7

Updated by Gerrit Code Review over 1 year ago

Patch set 18 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

#8

Updated by Gerrit Code Review over 1 year ago

Patch set 19 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

#9

Updated by Gerrit Code Review over 1 year ago

Patch set 20 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

#10

Updated by Benjamin Franzke over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#11

Updated by Helmut Hummel over 1 year ago

  • Related to Bug #90450: Defining an alias for a command overwrites its original command name added
#12

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
#13

Updated by Benjamin Franzke over 1 year ago

  • Related to Task #91534: Remove deprecated Commands.php loading added

Also available in: Atom PDF