This repository was archived by the owner on Mar 12, 2025. It is now read-only.
This repository was archived by the owner on Mar 12, 2025. It is now read-only.
Improve compatibility logic for the EventDispatcher #90
Closed
Description
See failed job in Codeception/module-laravel#12 . Caused by:
phpunit-wrapper/src/DispatcherWrapper.php
Lines 20 to 26 in f5d311f
Suggested change (based on https://github.com/lexik/LexikJWTAuthenticationBundle/pull/669/files):
- use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface;
+ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface;
//...
- if (!interface_exists(TraceableEventDispatcherInterface::class)) {
+ if ($dispatcher instanceof ContractsEventDispatcherInterface) {
$dispatcher->dispatch($eventObject, $eventType);
} else {
$dispatcher->dispatch($eventType, $eventObject);
}
Related to: Codeception/Codeception#6065
Metadata
Metadata
Assignees
Labels
No labels