-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which direction was this library going? #95
Comments
I copy your comment from #96
As far as I understand it from the discussion at #39, the The That sounds reasonable to me. |
I think it would have been better if an interface 'MultiGraphStatefuleInterface' was added that extends from StatefulInterface, this interface would require implementing something like setStateAccessor(StateAccessorInterface $stateAccessor, $graph). That way the support can be added BC and stateful objects are still easily recognizable in the application. The object would be responsible for returning it's correct state for a particular graph. |
I understand your points. Frankly it sounds like a good idea to unite multigraph and single graph states under the umbrella of one interface, and to have the interface mark stateful objects. We also wouldn't have to lose the little type hinting we can have in PHP (see #39). After all, "one is just a special case of many". Would you care to draw up a solution and offer it for code review in a pull request? |
Yes, I'll create a PR. |
@RonRademaker I partially agree with you. When creating Finite, having a I think I'll work on an interface-based multi-graph solution for 2.0 (aka BC break allowed), but i'll keep the current solution for 1.1, which allow you to use the interface for single-graph. |
1.1 will break BC in it's current condition, for example because all the typehints from StateMachine are gone (so anyone who has extended the class will have a broken package after an upgrade). |
@RonRademaker in fact, yes, you're right. |
I moved from the winzou/statemachine to this one because I wanted to add an interface to my stateful objects and have methods manipulate these. Now I've been looking at what has been committed into this library and I see those things have been changed in master. It looks like it was moving towards the winzou/statemachine approach.
I'd like to known the bigger picture about where this statemachine library is going. For now I'm planning to fork it at the last 1.0 release and apply my own patches from there.
The text was updated successfully, but these errors were encountered: