Project

General

Profile

Actions

Feature #89139

closed

Epic #83968: PSR-11 Initiative

Symfony Console Commands should be able to use dependency injection

Added by Benjamin Franzke about 5 years ago. Updated over 4 years 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 2 (0 open2 closed)

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
Actions #1

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

Actions #2

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

Actions #3

Updated by Gerrit Code Review almost 5 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

Actions #4

Updated by Gerrit Code Review almost 5 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

Actions #5

Updated by Gerrit Code Review almost 5 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

Actions #6

Updated by Gerrit Code Review almost 5 years 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

Actions #7

Updated by Gerrit Code Review almost 5 years 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

Actions #8

Updated by Gerrit Code Review almost 5 years 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

Actions #9

Updated by Gerrit Code Review almost 5 years 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

Actions #10

Updated by Benjamin Franzke almost 5 years ago

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

Updated by Helmut Hummel over 4 years ago

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

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions #13

Updated by Benjamin Franzke over 4 years ago

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

Also available in: Atom PDF