1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-10-21 19:56:58 +02:00

[ticket/17537] Cache extensions paths as metadata for ConfigCache

This should help with checking whether the ConfigCache is still fresh.

PHPBB-17537
This commit is contained in:
Marc Alexander
2025-08-31 22:00:51 +02:00
parent 5c7f19bf24
commit bfc60efeb5

View File

@@ -458,6 +458,7 @@ class container_builder
}
$extensions = $ext_container->get('ext.manager')->all_enabled();
$resources = [];
// Load each extension found
$autoloaders = '<?php
@@ -480,6 +481,11 @@ class container_builder
$this->container_extensions[] = new $extension_class($ext_name, $path);
if (is_dir($path))
{
$resources[] = new \Symfony\Component\Config\Resource\DirectoryResource($path);
}
// Load extension autoloader
$filename = $path . 'vendor/autoload.php';
if (file_exists($filename))
@@ -489,7 +495,7 @@ class container_builder
}
$configCache = new ConfigCache($this->get_autoload_filename(), false);
$configCache->write($autoloaders);
$configCache->write($autoloaders, $resources);
require($this->get_autoload_filename());
}