Closed G89Angel closed 5 years ago
Nevermind, I didn't notice that states was now an array with a name param. Now it's working:
'states' => [
[
'name' => OrderState::E_OPEN,
...
]
],
Hello,
I'm sorry for the confusion, I think this is actually a bug, because internally it's converting the array of states to an array of arrays with name parameter. But it's not working for states that are numeric, only strings. I will make a PR to fix this.
Can you update to ^2.0
or are you using and older version of PHP / Laravel?
Fixed by 4ea333dac9236ba1fd49fa97ddc50c389412a513. Please upgrade to v2.0.2 or let me know if you need a 1.3.x release.
Perfect, I've been able to test it today and working perfectly as expected. Again, thank you very much.
Hello,
whenever I use a version higher than 1.3.3 I get this exception:
SM\SMException - "Cannot set the state to "3" to object "App\Models\Order" with graph graphOrder because it is not pre-defined."
There is no change in state-machine and state 3 is listed in 'states'
Everything is a scalar value resolved by a constant. I couldn't find anything in 1.4.4 commits that could give me a hint of what is going on
Any idea?