2 declare(strict_types = 1);
19 use Symfony\Component\Finder\Finder;
20 use TYPO3\CMS\Core\Package\PackageManager;
46 $activePackages = GeneralUtility::makeInstance(PackageManager::class)->getActivePackages();
48 $finder = (
new Finder())->files()->depth(0)->name(
'*.php');
49 $hasDirectoryEntries =
false;
50 foreach ($activePackages as $package) {
52 $finder->in($package->getPackagePath() .
'Configuration/SiteConfiguration');
53 }
catch (\InvalidArgumentException $e) {
57 $hasDirectoryEntries =
true;
59 if ($hasDirectoryEntries) {
61 $GLOBALS[
'SiteConfiguration'][substr($fileInfo->getBasename(), 0, -4)] = require $fileInfo->getPathname();
65 $finder = (
new Finder())->files()->depth(0)->name(
'*.php');
66 $hasDirectoryEntries =
false;
67 foreach ($activePackages as $package) {
69 $finder->in($package->getPackagePath() .
'Configuration/SiteConfiguration/Overrides');
70 }
catch (\InvalidArgumentException $e) {
74 $hasDirectoryEntries =
true;
76 if ($hasDirectoryEntries) {
78 require $fileInfo->getPathname();