Skip to content

Commit bb7c303

Browse files
committed
remove Symfony 4.3 event dispatcher deprecation messages
1 parent c48f180 commit bb7c303

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/DynamicRouter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Cmf\Component\Routing\Event\RouterGenerateEvent;
1717
use Symfony\Cmf\Component\Routing\Event\RouterMatchEvent;
1818
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
19+
use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;
1920
use Symfony\Component\HttpFoundation\Request;
2021
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
2122
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
@@ -107,6 +108,10 @@ public function __construct(RequestContext $context,
107108
$this->uriFilterRegexp = $uriFilterRegexp;
108109
$this->provider = $provider;
109110

111+
if (class_exists(LegacyEventDispatcherProxy::class)) {
112+
$this->eventDispatcher = LegacyEventDispatcherProxy::decorate($eventDispatcher);
113+
}
114+
110115
$this->generator->setContext($context);
111116
}
112117

0 commit comments

Comments
 (0)