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