1
0
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:
rubencm
2020-12-09 02:28:09 +01:00
committed by rxu
parent 302632d240
commit 538ff83ccc
5 changed files with 18 additions and 3 deletions

View File

@@ -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();

View File

@@ -36,5 +36,13 @@ class markpublic_pass implements CompilerPassInterface
$definition->setPublic(true);
}
}
foreach ($container->getAliases() as $alias)
{
if ($alias->isPrivate())
{
$alias->setPublic(true);
}
}
}
}