PHP Fatal error: Declaration of Sebdesign\SM\Event\Dispatcher::getListeners(?string $eventName = null) must be compatible with Symfony\Component\EventDispatcher\EventDispatcherInterface::getListeners(?string $eventName = null): array
EvgenijVesnovsk opened this issue · 1 comments
Hi,
Today after running "composer update" command an error appeared in my project:
PHP Fatal error: Declaration of Sebdesign\SM\Event\Dispatcher::getListeners(?string $eventName = null) must be compatible with Symfony\Component\EventDispatcher\EventDispatcherInterface::getListeners(?string $eventName = null): array in /var/www/apvs/vendor/sebdesign/laravel-state-machine/src/Event/Dispatcher.php on line 73
Noticed that the following dependencies have been updated:
- Upgrading symfony/event-dispatcher (v5.4.3 => v6.0.3)
Code in src\Event\Dispatcher.php in your package:
public function getListeners(string $eventName = null)
{
throw new \Exception('Please use `Event::getListeners()`.');
}
Code in symfony/event-dispatcher package:
public function getListeners(string $eventName = null): array;
Please fix it. Thank you.
Hello, please update to v3.3.0, this issue has been resolved!
Thanks for reporting this bug.