mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/dic] Introduce DI processors instead of abusing compiler passes
PHPBB3-10739
This commit is contained in:
@@ -76,7 +76,8 @@ else
|
||||
|
||||
// Include essential scripts
|
||||
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/di/compiler/config_pass.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/di/processor/interface.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/di/processor/config.' . $phpEx);
|
||||
|
||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
|
||||
@@ -90,9 +91,8 @@ $phpbb_container = new ContainerBuilder();
|
||||
$loader = new YamlFileLoader($phpbb_container, new FileLocator(__DIR__.'/../config'));
|
||||
$loader->load('services.yml');
|
||||
|
||||
$phpbb_compiler = new Compiler();
|
||||
$phpbb_compiler->addPass(new phpbb_di_compiler_config_pass($phpbb_root_path . 'config.' . $phpEx, $phpbb_root_path, $phpEx));
|
||||
$phpbb_compiler->compile($phpbb_container);
|
||||
$processor = new phpbb_di_processor_config($phpbb_root_path . 'config.' . $phpEx, $phpbb_root_path, $phpEx);
|
||||
$processor->process($phpbb_container);
|
||||
|
||||
$phpbb_container->setAlias('cache.driver.install', 'cache.driver');
|
||||
|
||||
|
Reference in New Issue
Block a user