Open stephenjwinn opened 8 years ago
Changing stateAccessor
in constructor to $this->stateAccessor = $stateAccessor;
should propably fix the issue unless there is some reason for initialization in constructor that I am not aware of.
I will look into it in the morning
@stephenjwinn Please see #118
https://github.com/yohang/Finite/commit/c7a5672377695cdf65cd5f9a3372c18d0f02d7c1
The func hasStateAccessor() always evaluates to true because the StateMachine constructor inits the stateAccessor to a new PropertyPathStateAccessor...It's never null. So this doesn't work:
This wouldn't be a problem, except the StateMachine constructor doesn't pass in a configuration property_path param to the PropertyPathStateAccessor. So the StateAccessor I have is not good. It doesn't ever grab the state.