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\\.+#'