Skip to content

Commit ed3866d

Browse files
committed
[TASK] Migrate upgrade wizards registration
Since TYPO3 12.2 [1] registration upgrade wizards using the `$GLOBALS` array has been deprecated in favour of using the new PHP attribute `#[UpgradeWizard('myUpgradeWizard')]`. This change adopts the new way of registering upgrade following the migration path given in the changelog entry. [1] https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.2/Deprecation-99586-RegistrationOfUpgradeWizardsViaGLOBALS.html
1 parent 9f9c905 commit ed3866d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Classes/Upgrades/FormalityUpgradeWizard.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
use TYPO3\CMS\Core\Configuration\SiteConfiguration;
1111
use TYPO3\CMS\Core\Core\Environment;
1212
use TYPO3\CMS\Core\Utility\GeneralUtility;
13+
use TYPO3\CMS\Install\Attribute\UpgradeWizard;
1314
use TYPO3\CMS\Install\Updates\ChattyInterface;
1415
use TYPO3\CMS\Install\Updates\DatabaseUpdatedPrerequisite;
1516
use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;
1617
use WebVision\Deepltranslate\Core\Service\DeeplService;
1718

19+
#[UpgradeWizard('wvDeepltranslate_formalityUpgrade')]
1820
class FormalityUpgradeWizard implements UpgradeWizardInterface, ChattyInterface
1921
{
2022
protected OutputInterface $output;

ext_localconf.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
defined('TYPO3') or die();
44

55
(static function (): void {
6-
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['wvDeepltranslate_formalityUpgrade']
7-
= \WebVision\Deepltranslate\Core\Upgrades\FormalityUpgradeWizard::class;
8-
96
//allowLanguageSynchronizationHook manipulates l10n_state
107
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][]
118
= \WebVision\Deepltranslate\Core\Hooks\AllowLanguageSynchronizationHook::class;

0 commit comments

Comments
 (0)