Finite
Finite copied to clipboard
Incompatibility of 1.2.* where symfony/contracts also exists
If symfony/contracts
is also used in the project, there versions 1.2.* have an issue:
TypeError : Argument 2 passed to Symfony\Component\EventDispatcher\EventDispatcher::dispatch() must be an instance of Symfony\Component\EventDispatcher\Event or null, instance of Finite\Event\StateMachineEvent given
This seems to occur when someone has both the Symfony\Contracts\EventDispatcher\Event
and Symfony\Component\EventDispatcher\Event
installed. This check in StateMachineEvent
checks whether Symfony\Contracts\EventDispatcher\Event
exists, and aliases it to Symfony\Component\EventDispatcher\Event
if not.
Submitted PR to resolve this issue https://github.com/yohang/Finite/pull/158