We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 66fdc5a + 96fcc17 commit 9dc5743Copy full SHA for 9dc5743
Authorization/Voter/TraceableVoter.php
@@ -31,7 +31,12 @@ class TraceableVoter implements VoterInterface
31
public function __construct(VoterInterface $voter, EventDispatcherInterface $eventDispatcher)
32
{
33
$this->voter = $voter;
34
- $this->eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
+
35
+ if (class_exists(LegacyEventDispatcherProxy::class)) {
36
+ $this->eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
37
+ } else {
38
+ $this->eventDispatcher = $eventDispatcher;
39
+ }
40
}
41
42
public function vote(TokenInterface $token, $subject, array $attributes)
0 commit comments