Skip to content

Commit c7b8ea7

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 8908e24 + 9dc5743 commit c7b8ea7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Authorization/Voter/TraceableVoter.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ class TraceableVoter implements VoterInterface
3131
public function __construct(VoterInterface $voter, EventDispatcherInterface $eventDispatcher)
3232
{
3333
$this->voter = $voter;
34-
$this->eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
34+
35+
if (class_exists(LegacyEventDispatcherProxy::class)) {
36+
$this->eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
37+
} else {
38+
$this->eventDispatcher = $eventDispatcher;
39+
}
3540
}
3641

3742
public function vote(TokenInterface $token, $subject, array $attributes): int

0 commit comments

Comments
 (0)