Skip to content

Commit 9c0d47e

Browse files
committed
bug symfony#59398 [FrameworkBundle] add compiler pass only if it exists (xabbuh)
This PR was merged into the 7.3 branch. Discussion ---------- [FrameworkBundle] add compiler pass only if it exists | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 1eed13f add compiler pass only if it exists
2 parents 36a2bb1 + 1eed13f commit 9c0d47e

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)