Skip to content
Mark Scherer edited this page Jan 10, 2023 · 29 revisions

CakePHP version map

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

About

Ported version for CakePHP and release app from

Key Differences

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.

Improvements

These might want to be ported back into the Spryker core one.

TODO

Bugfixes

Should be ported back for sure.

Already ported back

Ideas to think about

  • 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.

Tips

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
Clone this wiki locally