Currently all transitions must be uniquely named. There's support to allow a transition to go from multiple states to a single end state, i.e.:
$config = ['transitions' => [
'foo' => [
'from' => ['a', 'b', 'c'],
'to' => 'd',
],
]];
I propose adding support to have transitions going to different states, but having a same name, i.e.:
$config = ['transitions' => [
'foo' => [
[
'from' => ['a', 'b', 'c'],
'to' => 'd',
],
[
'from' => ['e', 'f'],
'to' => 'g'
]
],
]];
This might not seem benefitial at first, but would be a huge help, when using the event dispatcher. It would enable having nifty listeners such as listening to confirm transitions and sending e-mails regarding the state change. No explicit listing of transitions would be necessary.
BC can also be kept by simply keeping support for the old structure.
Would you be interested in having this merged, should I implement it?
Currently all transitions must be uniquely named. There's support to allow a transition to go from multiple states to a single end state, i.e.:
I propose adding support to have transitions going to different states, but having a same name, i.e.:
This might not seem benefitial at first, but would be a huge help, when using the event dispatcher. It would enable having nifty listeners such as listening to
confirmtransitions and sending e-mails regarding the state change. No explicit listing of transitions would be necessary.BC can also be kept by simply keeping support for the old structure.
Would you be interested in having this merged, should I implement it?