Skip to content
Permalink
Browse files

bug #32331 [Workflow] only decorate when an event dispatcher was pass…

…ed (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
  • Loading branch information...
lyrixx committed Jul 3, 2019
2 parents 205cd7a + f19f28a commit b7a75e459efbb5c6c4a3bb56d6f29cbe40118acd
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Symfony/Component/Workflow/Workflow.php
@@ -43,7 +43,7 @@ public function __construct(Definition $definition, MarkingStoreInterface $marki
{
$this->definition = $definition;
$this->markingStore = $markingStore ?: new MultipleStateMarkingStore();
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
$this->dispatcher = null !== $dispatcher ? LegacyEventDispatcherProxy::decorate($dispatcher) : null;
$this->name = $name;
}

0 comments on commit b7a75e4

Please sign in to comment.
You can’t perform that action at this time.