Multiple issues / undocumented behaviors #186
YellowFish085
started this conversation in
Bugs
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
First thank you guys for all the packages you've created and maintained for Laravel, I couldn't imagine doing a Laravel project without at least a few of your packages in it.
I've been using this package for a few days and I've come across 2 issues. I do not know if these are actual issues or intended behaviors so I'll tag this discussion in the bugs category.
1) In the
StateConfig
class, the createTransitionKey() method generates keys using the"{$from}-{$to}"
format, and the transitionableStates() method splits the keys assuming that the key is indeed splittable in two with everything before-
being the from state and everything after being the to state.Because of that, it's not possible to set the
$name
property of a state to a string with-
in it because the transitionableStates() will break :This particularity is not documented in the related documentation page, if this is an intended behavior or a side effect of how the package works it should be documented.
2) I'm not 100% sure about the reason behind this issue, but I think that due to how the
State
class resolves state classes, it's not possible to have the concrete state classes in a different directory than the abstract class.As an example, using the classes in the documentation, you must have the
Pending
,Paid
andFailed
classes in the same directory as the abstractPaymentState
class they extend, else it won't work.Once again, I do not know if this is a side effect of how the package works but it's also not documented in the package documentation.
That's all, thanks again for the work you're doing on all these packages and have a nice day!
Beta Was this translation helpful? Give feedback.
All reactions