Skip to content

Commit

Permalink
make tests forward compatible with DI 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jul 24, 2019
1 parent 1ce527a commit affede1
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -1170,6 +1170,7 @@ protected function createContainerFromFile($file, $data = [], $resetCompilerPass
if ($resetCompilerPasses) {
$container->getCompilerPassConfig()->setOptimizationPasses([]);
$container->getCompilerPassConfig()->setRemovingPasses([]);
$container->getCompilerPassConfig()->setAfterRemovingPasses([]);
}
$container->getCompilerPassConfig()->setBeforeRemovingPasses([new AddConstraintValidatorsPass(), new TranslatorPass('translator.default', 'translation.reader')]);
$container->getCompilerPassConfig()->setAfterRemovingPasses([new AddAnnotationsCachedReaderPass()]);
Expand All @@ -1191,6 +1192,7 @@ protected function createContainerFromClosure($closure, $data = [])

$container->getCompilerPassConfig()->setOptimizationPasses([]);
$container->getCompilerPassConfig()->setRemovingPasses([]);
$container->getCompilerPassConfig()->setAfterRemovingPasses([]);
$container->compile();

return $container;
Expand Down

0 comments on commit affede1

Please sign in to comment.