winzou/state-machine
Lightweight PHP state machine library. Define graphs with states, transitions, and guard/before/after callbacks, then apply and validate transitions on your domain objects. Supports multiple graphs per object and configurable state property paths.
Full Changelog: https://github.com/winzou/state-machine/compare/0.4.5...0.4.6
Full Changelog: https://github.com/winzou/state-machine/compare/0.4.4...0.4.5
Full Changelog: https://github.com/winzou/state-machine/compare/0.4.3...0.4.4
Cf https://github.com/winzou/state-machine/pull/26 for more details.
Add guards to prevent a transition to happen. Guards are first-class callbacks. Cf. https://github.com/winzou/state-machine/pull/25 for more details.
The after callbacks had the already updated state instead of the one before the transition.
BC break: TransitionEvent::construct now takes the initial state as a 2nd argument.
Changes in state machine and factory arguments:
No BC break.
First release. Should be already usable though.
How can I help you explore Laravel packages today?