From 6adef85252b4e930d2553f7e5d8cc477810afddd Mon Sep 17 00:00:00 2001
From: Kevin Ditscheid <kevin.ditscheid@sgalinski.de>
Date: Thu, 9 Jul 2020 15:15:08 +0200
Subject: [PATCH] [TASK] Use identifier constants for the upgrade wizards

---
 Classes/Updates/UpdateAuthors.php | 7 ++++++-
 ext_localconf.php                 | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Classes/Updates/UpdateAuthors.php b/Classes/Updates/UpdateAuthors.php
index 1da6174..eb56fa7 100644
--- a/Classes/Updates/UpdateAuthors.php
+++ b/Classes/Updates/UpdateAuthors.php
@@ -38,6 +38,11 @@ use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;
  * Migrate template db entries to the correct root pages
  */
 class UpdateAuthors implements UpgradeWizardInterface {
+	/**
+	 * The wizard identifier
+	 */
+	const IDENTIFIER = 'tx_sgnews_update_authors';
+
 	/**
 	 * Retrieves the next site root in the page hierarchy from the current page
 	 *
@@ -62,7 +67,7 @@ class UpdateAuthors implements UpgradeWizardInterface {
 	 * @return string
 	 */
 	public function getIdentifier(): string {
-		return 'tx_sgnews_update_authors';
+		return self::IDENTIFIER;
 	}
 
 	/**
diff --git a/ext_localconf.php b/ext_localconf.php
index baa34d7..eb2b01c 100644
--- a/ext_localconf.php
+++ b/ext_localconf.php
@@ -145,7 +145,7 @@ call_user_func(
 		);
 
 		// Add upgrade wizards
-		$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tx_sgnews_update_authors'] =
+		$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\SGalinski\SgNews\Updates\UpdateAuthors::IDENTIFIER] =
 			\SGalinski\SgNews\Updates\UpdateAuthors::class;
 	}, 'sg_news'
 );
-- 
GitLab