8000 bug #32331 [Workflow] only decorate when an event dispatcher was pass… · symfony/symfony@b7a75e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit b7a75e4

Browse files
committed
bug #32331 [Workflow] only decorate when an event dispatcher was passed (xabbuh)
This PR was merged into the 4.3 branch. Discussion ---------- [Workflow] only decorate when an event dispatcher was passed | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #32330 | License | MIT | Doc PR | Commits ------- f19f28a only decorate when an event dispatcher was passed
2 parents 205cd7a + f19f28a commit b7a75e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Workflow/Workflow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(Definition $definition, MarkingStoreInterface $marki
4343
{
4444
$this->definition = $definition;
4545
$this->markingStore = $markingStore ?: new MultipleStateMarkingStore();
46-
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
46+
$this->dispatcher = null !== $dispatcher ? LegacyEventDispatcherProxy::decorate($dispatcher) : null;
4747
$this->name = $name;
4848
}
4949

0 commit comments

Comments
 (0)
0