Don't break event listeners with the GenericEventWrapper

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-06-16 19:30:36 +02:00
parent 5e52c110bb
commit c76fa60571
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ class SymfonyAdapter implements EventDispatcherInterface {
if ($event instanceof Event) {
$this->eventDispatcher->dispatch($eventName, $event);
} else {
if ($event instanceof GenericEvent) {
if ($event instanceof GenericEvent && get_class($event) === GenericEvent::class) {
$newEvent = new GenericEventWrapper($this->logger, $eventName, $event);
} else {
$newEvent = $event;