[FEATURE] Add dependency injection support for console commands
Transform CommandRegistry into a symfony CommandLoader which allows console commands to be created on demand. That means commands are lazy loaded in order to avoid creating all commands with all their dependencies in every console invocation. Command will now be loaded when they are either executed or when command metadata is required (e.g. for the command listing) The `site:list` command is adapted to make use of dependency injection. Releases: master Resolves: #89139 Change-Id: I64256bf2dc21f0f3fe434aa5dff6176f0fe22233 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61630 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
Achim Fritz <af@achimfritz.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Achim Fritz <af@achimfritz.de> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/backend/Configuration/Commands.php 0 additions, 20 deletionstypo3/sysext/backend/Configuration/Commands.php
- typo3/sysext/backend/Configuration/Services.yaml 12 additions, 0 deletionstypo3/sysext/backend/Configuration/Services.yaml
- typo3/sysext/core/Classes/Command/SiteListCommand.php 12 additions, 2 deletionstypo3/sysext/core/Classes/Command/SiteListCommand.php
- typo3/sysext/core/Classes/Console/CommandApplication.php 11 additions, 4 deletionstypo3/sysext/core/Classes/Console/CommandApplication.php
- typo3/sysext/core/Classes/Console/CommandRegistry.php 128 additions, 5 deletionstypo3/sysext/core/Classes/Console/CommandRegistry.php
- typo3/sysext/core/Classes/DependencyInjection/ConsoleCommandPass.php 67 additions, 0 deletions...t/core/Classes/DependencyInjection/ConsoleCommandPass.php
- typo3/sysext/core/Classes/ServiceProvider.php 10 additions, 1 deletiontypo3/sysext/core/Classes/ServiceProvider.php
- typo3/sysext/core/Configuration/Commands.php 0 additions, 23 deletionstypo3/sysext/core/Configuration/Commands.php
- typo3/sysext/core/Configuration/Services.php 1 addition, 0 deletionstypo3/sysext/core/Configuration/Services.php
- typo3/sysext/core/Configuration/Services.yaml 42 additions, 0 deletionstypo3/sysext/core/Configuration/Services.yaml
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-89139-ConsoleCommandsConfigurationMigratedToSymfonyServiceTags.rst 73 additions, 0 deletions...soleCommandsConfigurationMigratedToSymfonyServiceTags.rst
- typo3/sysext/core/Documentation/Changelog/master/Feature-89139-AddDependencyInjectionSupportForConsoleCommands.rst 73 additions, 0 deletions...89139-AddDependencyInjectionSupportForConsoleCommands.rst
- typo3/sysext/core/Tests/Unit/Console/CommandRegistryTest.php 55 additions, 71 deletionstypo3/sysext/core/Tests/Unit/Console/CommandRegistryTest.php
- typo3/sysext/core/Tests/UnitDeprecated/Console/CommandRegistryTest.php 181 additions, 0 deletions...core/Tests/UnitDeprecated/Console/CommandRegistryTest.php
- typo3/sysext/extensionmanager/Configuration/Commands.php 0 additions, 17 deletionstypo3/sysext/extensionmanager/Configuration/Commands.php
- typo3/sysext/extensionmanager/Configuration/Services.yaml 28 additions, 0 deletionstypo3/sysext/extensionmanager/Configuration/Services.yaml
- typo3/sysext/impexp/Configuration/Commands.php 0 additions, 12 deletionstypo3/sysext/impexp/Configuration/Commands.php
- typo3/sysext/impexp/Configuration/Services.yaml 5 additions, 0 deletionstypo3/sysext/impexp/Configuration/Services.yaml
- typo3/sysext/install/Classes/ServiceProvider.php 34 additions, 0 deletionstypo3/sysext/install/Classes/ServiceProvider.php
- typo3/sysext/install/Configuration/Commands.php 0 additions, 20 deletionstypo3/sysext/install/Configuration/Commands.php
Please register or sign in to comment