mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-18 06:21:19 +02:00
[ticket/16649] Add compiler pass to tests
PHPBB3-16649
This commit is contained in:
@@ -198,9 +198,6 @@ class container_builder
|
||||
|
||||
$this->container = $this->create_container($this->container_extensions);
|
||||
|
||||
// Mark all services public
|
||||
$this->container->addCompilerPass(new pass\markpublic_pass());
|
||||
|
||||
// Easy collections through tags
|
||||
$this->container->addCompilerPass(new pass\collection_pass());
|
||||
|
||||
@@ -220,6 +217,9 @@ class container_builder
|
||||
|
||||
$this->inject_custom_parameters();
|
||||
|
||||
// Mark all services public
|
||||
$this->container->addCompilerPass(new pass\markpublic_pass());
|
||||
|
||||
if ($this->compile_container)
|
||||
{
|
||||
$this->container->compile();
|
||||
|
@@ -36,5 +36,13 @@ class markpublic_pass implements CompilerPassInterface
|
||||
$definition->setPublic(true);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($container->getAliases() as $alias)
|
||||
{
|
||||
if ($alias->isPrivate())
|
||||
{
|
||||
$alias->setPublic(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user