-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Mark Scherer edited this page Jan 10, 2023
·
29 revisions
StateMachine plugin | branch | CakePHP core | PHP min |
---|---|---|---|
0.1.x | cake3 | 3.x | PHP 5.6 |
1.x | master | 4.x | PHP 7.4 |
2.x | cake5 | 5.x | PHP 8.1 |
Ported version for CakePHP and release app from
- Spryker StateMachine module: https://github.com/spryker/state-machine
Between the core (original) and this port.
- The Transfers for persistence have been removed in favor of the Entities for the Tables (1:1)
- The Transfers for pure data transfer have been replaced by Dto generated DTOs for more strictness.
- Command and Condition stacks are
string[]
and lazy-instantiated when needed. - onEnter events do not count as manually executable anymore (require explicit manual=true use)
- maxEvent protection for loops also include logged transitions and persisted data now, this prevents timeout loops running forever. For state machines that want to allow this, the Configure
StateMachine.maxEventRepeats
key can be configured to a high value.
These might want to be ported back into the Spryker core one.
- More strictness (type-hinting) and PHPStan level 7.
- Test coverage
- Auto detect process for new items ( https://github.com/spryker/cakephp-statemachine/pull/8 )
- Event name is persisted in transition logs that failed to know not only beginning state, but also what event was trying to complete.
- Fix parallel running from two or more versions of state machine
- Allow sort states history for getItemWithFlag
Should be ported back for sure.
- log event name in error case: https://github.com/spryker/cakephp-statemachine/pull/13
- post instead of get for trigger via URL
- Display name ( https://github.com/spryker/cakephp-statemachine/commit/68da7c86b660e051b0247f9f4639f951e3ea02de )
- doc block fixes https://github.com/spryker/spryker/pull/5232
- string vs int mixup on transfers https://github.com/spryker/spryker/pull/5243
- Rename: StateMachineItemStateLogs model instead of StateMachineItemStateHistory
- Allow slugged/dashed names only, especially for states ("Ready for release" => "ready-for-release"), display name could be used (or auto humanizing for display can make the strings readable) for display.
Update annotations inside the plugin from project via
bin/cake annotations all -v -p StateMachine
Use -d
to dry-run first :)
Update DTOs from project via
bin/cake dto generate -v -p StateMachine