From db600279587135faa60b7f3f481da89dc9e2410b 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/DepartmentUpdateWizard.php | 6 +++++-
 ext_localconf.php                          | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Classes/Updates/DepartmentUpdateWizard.php b/Classes/Updates/DepartmentUpdateWizard.php
index 6515b6d0..f9f97de0 100644
--- a/Classes/Updates/DepartmentUpdateWizard.php
+++ b/Classes/Updates/DepartmentUpdateWizard.php
@@ -38,6 +38,10 @@ use TYPO3\CMS\Install\Updates\UpgradeWizardInterface;
  * @author Kevin Ditscheid <kevin.ditscheid@sgalinski.de>
  */
 class DepartmentUpdateWizard implements UpgradeWizardInterface {
+	/**
+	 * The wizard identifier
+	 */
+	const IDENTIFIER = 'tx_sgjobs_departmentupdatewizward';
 
 	/**
 	 * Check if the job table has a deleted area field
@@ -86,7 +90,7 @@ class DepartmentUpdateWizard implements UpgradeWizardInterface {
 	 * @return string
 	 */
 	public function getIdentifier(): string {
-		return 'tx_sgjobs_departmentupdatewizward';
+		return self::IDENTIFIER;
 	}
 
 	/**
diff --git a/ext_localconf.php b/ext_localconf.php
index 6ec77b8e..1b2bdb97 100644
--- a/ext_localconf.php
+++ b/ext_localconf.php
@@ -98,7 +98,7 @@ call_user_func(
 		);
 
 		// Register the upgrade wizard
-		$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['tx_sgjobs_departmentupdatewizward']
+		$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\SGalinski\SgJobs\Updates\DepartmentUpdateWizard::IDENTIFIER]
 			= \SGalinski\SgJobs\Updates\DepartmentUpdateWizard::class;
 
 		if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '>')) {
-- 
GitLab