Feature: #73042 - Introduce native support for Symfony Console ¶
See Issue #73042
TYPO3 supports the Symfony Console component out-of-the-box now by providing a new Command Line script
. On TYPO3 instances installed via Composer, the binary is
linked into the
The new binary still supports the existing command-line arguments when no proper Symfony Console command was found as a fallback.
Registering a command to be available via the
command line tool works by putting a
file into any installed extension. This lists the Symfony/Console/Command classes
to be executed by
is an associative array. The key is the name of the command to be called as
the first argument to
A required parameter when registering a command is the
property which should inherit from Symfony’s
base Command class.
could look like this:
return [ 'backend:lock' => [ 'class' => \TYPO3\CMS\Backend\Command\LockBackendCommand::class ], 'referenceindex:update' => [ 'class' => \TYPO3\CMS\Backend\Command\ReferenceIndexUpdateCommand::class ] ];
An example call could look like:
bin/typo3 backend:lock http://www.mydomain.com/maintenance.html
For a non-Composer installation:
typo3/sysext/core/bin/typo3 backend:lock http://www.mydomain.com/maintenance.html
Using Symfony Commands and calling
instead of using
now the preferred way for writing command line code.