coreCache->require($this->cacheIdentifier); if ($providers !== false) { return $providers; } return $this->createCache(); } private function createCache(): array { $packages = $this->packageManager->getActivePackages(); $providers = []; foreach ($packages as $package) { $packageConfiguration = $package->getPackagePath() . 'Configuration/ExpressionLanguage.php'; if (file_exists($packageConfiguration)) { $providersInPackage = require $packageConfiguration; if (is_array($providersInPackage)) { $providers[] = $providersInPackage; } } } $providers = count($providers) > 0 ? array_merge_recursive(...$providers) : $providers; $this->coreCache->set($this->cacheIdentifier, 'return ' . var_export($providers, true) . ';'); return $providers; } /** * @internal */ #[AsEventListener] public function warmupCaches(CacheWarmupEvent $event): void { if ($event->hasGroup('system')) { $this->createCache(); } } }