Skip to content
Snippets Groups Projects
Commit de497be8 authored by Helmut Hummel's avatar Helmut Hummel Committed by Benni Mack
Browse files

[BUGFIX] Change deprecation of language:update command

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: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent f46db43f
Branches
Tags
No related merge requests found
.. 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.
......
......@@ -56,9 +56,8 @@ class LanguageUpdateCommand extends Command
*/
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)
......@@ -79,8 +78,8 @@ class LanguageUpdateCommand extends Command
*/
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);
}
......
......@@ -5,12 +5,9 @@
* 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
]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment