From 9344bf4d0a21e7c4f9abd252dcc9db8f3a73e932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Cobucci?= Date: Mon, 4 Jun 2018 18:14:40 +0200 Subject: [PATCH] Fix type of the test compiler pass So that it gets executed before of removing private services, which is important for compiler passes that adds new aliases/services and have lower priorities. --- src/ContainerBuilder.php | 2 +- test/ContainerBuilderTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ContainerBuilder.php b/src/ContainerBuilder.php index b0d490b0..f2d7d7db 100644 --- a/src/ContainerBuilder.php +++ b/src/ContainerBuilder.php @@ -153,7 +153,7 @@ public function getContainer(): ContainerInterface public function getTestContainer(): ContainerInterface { $config = clone $this->config; - $config->addPass(new MakeServicesPublic()); + $config->addPass(new MakeServicesPublic(), PassConfig::TYPE_BEFORE_REMOVING); return $this->generator->generate( $config, diff --git a/test/ContainerBuilderTest.php b/test/ContainerBuilderTest.php index 32b95f90..3f34220e 100644 --- a/test/ContainerBuilderTest.php +++ b/test/ContainerBuilderTest.php @@ -321,7 +321,7 @@ public function getTestContainerShouldGenerateAndReturnTheContainer(): void $config = new ContainerConfiguration(); $config->addPass($this->parameterBag); - $config->addPass(new MakeServicesPublic()); + $config->addPass(new MakeServicesPublic(), PassConfig::TYPE_BEFORE_REMOVING); $cacheConfig = new ConfigCache($config->getDumpFile('test_'), true);