Keep the nice and concise name instead of the long and clumsy name.
Also set an alias instead of registering the command twice.
Releases: master
Resolves: #82315
Change-Id: I302977702e2d09f1377f078af2f8b60f515cce1e
Reviewed-on: https://review.typo3.org/55205
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Benni Mack <benni@typo3.org>
.. include:: ../../Includes.txt
-=========================================================
-Deprecation: #82315 - Deprecate bin/typo3 language:update
-=========================================================
+==============================================================
+Deprecation: #82315 - Deprecate bin/typo3 lang:language:update
+==============================================================
See :issue:`82315`
Description
===========
-The command `language:update` is an alias of `lang:language:update`, therefore it's superfluous and
+The command `lang:language:update` is an alias of `language:update`, therefore it's superfluous and
will be removed in the future.
Impact
======
-The command `language:update` will not work any more.
+The command `lang:language:update` will show a deprecation message when used.
Affected Installations
======================
-All installations that make use of the command `language:update`. Most likely there are cronjobs
+All installations that make use of the command `lang:language:update`. Most likely there are cronjobs
that need to be adjusted.
*/
protected function configure()
{
- $description = ($this->getName() === 'language:update')
- ? '[Deprecated] Use lang:language:update instead'
- : 'Update the language files of all activated extensions';
+ $this->setAliases(['lang:language:update']);
+ $description = 'Update the language files of all activated extensions';
$this
->setDescription($description)
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
- if ($this->getName() === 'language:update') {
- $message = 'bin/typo3 language:update is deprecated, use bin/typo3 lang:language:update instead';
+ if (substr_count($input->getArgument('command'), ':') === 2) {
+ $message = 'bin/typo3 lang:language:update is deprecated, use bin/typo3 language:update instead';
$output->writeln('<error>' . $message . '</error>');
trigger_error($message, E_USER_DEPRECATED);
}
* Required parameter is the "class" of the command which needs to be a subclass
* of Symfony/Console/Command.
*
- * example: bin/typo3 lang:language:update
+ * example: bin/typo3 language:update
*/
return [
- 'lang:language:update' => [
- 'class' => \TYPO3\CMS\Lang\Command\LanguageUpdateCommand::class
- ],
'language:update' => [
'class' => \TYPO3\CMS\Lang\Command\LanguageUpdateCommand::class
]