Skip to content

Commit

Permalink
bug #32331 [Workflow] only decorate when an event dispatcher was pass…
Browse files Browse the repository at this point in the history
…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 b7a75e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Workflow/Workflow.php
Expand Up @@ -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;
}

Expand Down

0 comments on commit b7a75e4

Please sign in to comment.