mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 08:17:47 +02:00
[ticket/11152] Compile the install container
PHPBB3-11152
This commit is contained in:
@@ -53,16 +53,19 @@ function phpbb_create_container(array $extensions, $phpbb_root_path, $php_ext)
|
|||||||
*/
|
*/
|
||||||
function phpbb_create_install_container($phpbb_root_path, $php_ext)
|
function phpbb_create_install_container($phpbb_root_path, $php_ext)
|
||||||
{
|
{
|
||||||
// We have to do it like this instead of with extensions
|
$core = new phpbb_di_extension_core($phpbb_root_path);
|
||||||
$container = new ContainerBuilder();
|
$container = phpbb_create_container(array($core), $phpbb_root_path, $php_ext);
|
||||||
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../config'));
|
|
||||||
$loader->load('services.yml');
|
|
||||||
|
|
||||||
$container->setParameter('core.root_path', $phpbb_root_path);
|
$container->setParameter('core.root_path', $phpbb_root_path);
|
||||||
$container->setParameter('core.php_ext', $php_ext);
|
$container->setParameter('core.php_ext', $php_ext);
|
||||||
|
$container->setParameter('core.table_prefix', '');
|
||||||
|
|
||||||
|
$container->register('dbal.conn')->setSynthetic(true);
|
||||||
|
|
||||||
$container->setAlias('cache.driver', 'cache.driver.install');
|
$container->setAlias('cache.driver', 'cache.driver.install');
|
||||||
|
|
||||||
|
$container->compile();
|
||||||
|
|
||||||
return $container;
|
return $container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user