Feature: #93174 - Lazy console command list¶
The TYPO3 command line utility
typo3/sysext/core/bin/typo3 has been adapted to
avoid instantiating all available console commands during the execution of the
typo3 list command.
This enables commands to inject dependencies that require a fully booted system, or a database connection, without causing the console command list to break or slow down.
New tag properties for the
console.command dependency injection tag
have been added. The properties control the appearance of console commands in the
The description of the command (default:
Command will be hidden from
Example of a command registration that includes a description¶
The command list requires the description to be set next to the command
Services.yaml in order for descriptions to be shown:
# Configuration/Services.yaml services: My\Namespace\Command\ExampleCommand: tags: - name: 'console.command' command: 'my:example' description: 'An example command that demonstrates some stuff' # not required, defaults to false hidden: false
Extension authors should add the
description property to existing
console.command dependency injection tags.
The call to
be removed, as the description, as defined in
Services.yaml, will be
injected into the command.
Extensions authors are now able to inject arbitrary dependencies in console commands, without impacting the loading of the command list.
Integrators profit from a stable command list that is fast and always available, even if a command is not instantiable or if it inadvertently contains too much logic inside the command constructor.