Skip to content

Commit 9458ad8

Browse files
Merge branch '4.3' into 4.4
* 4.3: gracefully handle missing event dispatchers [Cache] fix memory leak when using PhpArrayAdapter fix parsing negative octal numbers [SecurityBundle] Properly escape regex in AddSessionDomainConstraintPass [Config] never try loading failed classes twice with ClassExistenceResource
2 parents da0cf4e + 8146730 commit 9458ad8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Workflow.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ public function __construct(Definition $definition, MarkingStoreInterface $marki
4343
{
4444
$this->definition = $definition;
4545
$this->markingStore = $markingStore ?: new MultipleStateMarkingStore();
46-
$this->dispatcher = null !== $dispatcher ? LegacyEventDispatcherProxy::decorate($dispatcher) : null;
46+
47+
if (null !== $dispatcher && class_exists(LegacyEventDispatcherProxy::class)) {
48+
$this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
49+
} else {
50+
$this->dispatcher = $dispatcher;
51+
}
52+
4753
$this->name = $name;
4854
}
4955

0 commit comments

Comments
 (0)