From ad6983d4d5bfaf4baf3247f8c9aaf9e2bab017c5 Mon Sep 17 00:00:00 2001 From: Mathias Brodala Date: Tue, 24 May 2022 17:00:37 +0200 Subject: [PATCH] [TASK] Fully migrate to ExtensionConfiguration API --- ext_localconf.php | 18 ++++++------------ phpstan.neon | 2 -- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/ext_localconf.php b/ext_localconf.php index 434f4fbd..2efe2301 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -89,18 +89,12 @@ // Load Extension Manager settings (function (): void { - $extensionConfiguration = []; - - if (class_exists(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class)) { - try { - $extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class) - ->get('searchable'); - } catch (\TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException $e) { - $extensionConfiguration = []; - } - } else { - $extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\TypoScriptService::class) - ->convertTypoScriptArrayToPlainArray(unserialize($_EXTCONF)); + try { + $extensionConfiguration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( + \TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class + )->get('searchable'); + } catch (\TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException $e) { + $extensionConfiguration = []; } foreach ($extensionConfiguration as $key => $value) { diff --git a/phpstan.neon b/phpstan.neon index 83835853..28ebd495 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -14,8 +14,6 @@ parameters: path: ext_emconf.php - message: '#Undefined variable: \$_EXTCONF#' path: ext_localconf.php - - message: '#TYPO3\\CMS\\Core\\Configuration\\Exception\\ExtensionConfigurationExtensionNotConfiguredException#' - path: ext_localconf.php - message: '#Psr\\Http\\Server\\MiddlewareInterface#' path: Classes/Middleware/UriBuilder.php - message: '#TYPO3\\CMS\\Core\\Context\\.+#'