Composition or Enum #216
LucasLaurens
started this conversation in
General
Replies: 1 comment 1 reply
-
for example: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have two questions about this package. Firstly I want to say that it is a great package.
Then I wonder if it would not be a good idea to create a method that takes into account the starting state to go to the end state? For example, allowTransitionByStates. Because at the moment the only way I see to have transitions for each model where I need to apply statuses is to copy the status classes so that they extend from the right base class linked to the model. I figure it would be less code if the checks were status related instead of namespace related. Or maybe go through composition instead of inheritance? In order to abstract and modify more easily and have reusable status classes. Ex: Failed for all abstract classes and not one class for one class. However I like the idea of status to status as https://github.com/sebdesign/laravel-state-machine. However, I don't know if what I'm saying seems coherent and, above all, understandable in relation to what I really think. However, if my subject does not seem to you to bring something more to advance this package, I appreciate it as it is now. I would like to have your opinion on this possible evolution.
Beta Was this translation helpful? Give feedback.
All reactions