Skip to content

Commit 2b95681

Browse files
committed
[FrameworkBundle] Fix requiring moved translation compiler passes
1 parent ad081be commit 2b95681

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function build(ContainerBuilder $container)
143143
$container->addCompilerPass(new RegisterControllerArgumentLocatorsPass());
144144
$container->addCompilerPass(new RemoveEmptyControllerArgumentLocatorsPass(), PassConfig::TYPE_BEFORE_REMOVING);
145145
$container->addCompilerPass(new RoutingResolverPass());
146-
$container->addCompilerPass(new DataCollectorTranslatorPass());
146+
$this->addCompilerPassIfExists($container, DataCollectorTranslatorPass::class);
147147
$container->addCompilerPass(new ProfilerPass());
148148
// must be registered before removing private services as some might be listeners/subscribers
149149
// but as late as possible to get resolved parameters
@@ -156,7 +156,7 @@ public function build(ContainerBuilder $container)
156156
// twig.template_iterator definition
157157
$this->addCompilerPassIfExists($container, TranslatorPass::class, PassConfig::TYPE_BEFORE_OPTIMIZATION, -32);
158158
$this->addCompilerPassIfExists($container, TranslatorPathsPass::class, PassConfig::TYPE_AFTER_REMOVING);
159-
$container->addCompilerPass(new LoggingTranslatorPass());
159+
$this->addCompilerPassIfExists($container, LoggingTranslatorPass::class);
160160
$container->addCompilerPass(new AddExpressionLanguageProvidersPass());
161161
$this->addCompilerPassIfExists($container, TranslationExtractorPass::class);
162162
$this->addCompilerPassIfExists($container, TranslationDumperPass::class);

0 commit comments

Comments
 (0)