Skip to content

Commit 666daca

Browse files
authored
Merge pull request phpbb#6842 from marc1706/ticket/17537
[ticket/17537] Cache extensions paths as metadata for ConfigCache
2 parents 5c7f19b + bfc60ef commit 666daca

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

phpBB/phpbb/di/container_builder.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ protected function load_extensions()
458458
}
459459

460460
$extensions = $ext_container->get('ext.manager')->all_enabled();
461+
$resources = [];
461462

462463
// Load each extension found
463464
$autoloaders = '<?php
@@ -480,6 +481,11 @@ protected function load_extensions()
480481

481482
$this->container_extensions[] = new $extension_class($ext_name, $path);
482483

484+
if (is_dir($path))
485+
{
486+
$resources[] = new \Symfony\Component\Config\Resource\DirectoryResource($path);
487+
}
488+
483489
// Load extension autoloader
484490
$filename = $path . 'vendor/autoload.php';
485491
if (file_exists($filename))
@@ -489,7 +495,7 @@ protected function load_extensions()
489495
}
490496

491497
$configCache = new ConfigCache($this->get_autoload_filename(), false);
492-
$configCache->write($autoloaders);
498+
$configCache->write($autoloaders, $resources);
493499

494500
require($this->get_autoload_filename());
495501
}

0 commit comments

Comments
 (0)