Skip to content

Commit

Permalink
[TASK] Fully migrate to ExtensionConfiguration API
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrodala committed May 24, 2022
1 parent 40c5e07 commit ad6983d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
18 changes: 6 additions & 12 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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\\.+#'
Expand Down

0 comments on commit ad6983d

Please sign in to comment.