Skip to content

Commit

Permalink
Merge pull request #76 from pagemachine/typo3v9-extension-configuration
Browse files Browse the repository at this point in the history
Fully migrate to ExtensionConfiguration API
  • Loading branch information
mbrodala authored May 24, 2022
2 parents 40c5e07 + ad6983d commit 2350529
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 2350529

Please sign in to comment.