[ticket/11574] Try to load updated service.yml before the default one

PHPBB3-11574
This commit is contained in:
Joas Schilling 2013-06-10 13:48:21 +02:00
parent d72b5aaf1b
commit 06caac0444

View file

@ -50,10 +50,18 @@ class phpbb_di_extension_core extends Extension
* @throws InvalidArgumentException When provided tag is not defined in this extension * @throws InvalidArgumentException When provided tag is not defined in this extension
*/ */
public function load(array $config, ContainerBuilder $container) public function load(array $config, ContainerBuilder $container)
{
if (file_exists($this->root_path . 'install/update/new/config/services.yml'))
{
$loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'install/update/new/config')));
$loader->load('services.yml');
}
else if (file_exists($this->root_path . 'config/services.yml'))
{ {
$loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'config'))); $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'config')));
$loader->load('services.yml'); $loader->load('services.yml');
} }
}
/** /**
* Returns the recommended alias to use in XML. * Returns the recommended alias to use in XML.