Skip to content

Commit 0284e95

Browse files
committed
bug #52188 [FrameworkBundle][Workflow] Add WorflowGuardListenerPass only if it exists (smnandre)
This PR was merged into the 6.4 branch. Discussion ---------- [FrameworkBundle][Workflow] Add `WorflowGuardListenerPass` only if it exists | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #52187 | License | MIT As spotted by `@PhilETaylor` (in [this comment](#52032 (comment))) the framework is broken in 6.4-dev when the worflow component is not installed. This PR fixes that by registering the compiler pass only if available. Commits ------- 1ba348a Add WorflowGuardListenerPass only if it exists
2 parents 97bbd4e + 1ba348a commit 0284e95

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
@@ -168,7 +168,7 @@ public function build(ContainerBuilder $container)
168168
$container->addCompilerPass(new CachePoolClearerPass(), PassConfig::TYPE_AFTER_REMOVING);
169169
$container->addCompilerPass(new CachePoolPrunerPass(), PassConfig::TYPE_AFTER_REMOVING);
170170
$this->addCompilerPassIfExists($container, FormPass::class);
171-
$container->addCompilerPass(new WorkflowGuardListenerPass());
171+
$this->addCompilerPassIfExists($container, WorkflowGuardListenerPass::class);
172172
$container->addCompilerPass(new ResettableServicePass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -32);
173173
$container->addCompilerPass(new RegisterLocaleAwareServicesPass());
174174
$container->addCompilerPass(new TestServiceContainerWeakRefPass(), PassConfig::TYPE_BEFORE_REMOVING, -32);

0 commit comments

Comments
 (0)