Skip to content

Commit 1eed13f

Browse files
committed
add compiler pass only if it exists
1 parent 36a2bb1 commit 1eed13f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public function build(ContainerBuilder $container): void
189189
$container->addCompilerPass(new ErrorLoggerCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32);
190190
$container->addCompilerPass(new VirtualRequestStackPass());
191191
$container->addCompilerPass(new TranslationUpdateCommandPass(), PassConfig::TYPE_BEFORE_REMOVING);
192-
$container->addCompilerPass(new EncodablePass());
192+
$this->addCompilerPassIfExists($container, EncodablePass::class);
193193

194194
if ($container->getParameter('kernel.debug')) {
195195
$container->addCompilerPass(new AddDebugLogProcessorPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 2);

0 commit comments

Comments
 (0)