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
Provide the State Machine abstraction #15315
Conversation
Bunnyshell Preview Environment deletedAvailable commands:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about twig helper functions like sm_can
, will they be abstracted as well?
src/Sylius/Bundle/CoreBundle/StateMachine/CompositeStateMachine.php
Outdated
Show resolved
Hide resolved
Thanks for mentioning about twig functions, I totally forgot about them 😅. |
1a23a25
to
09b70b9
Compare
c0313c5
to
8a3df8a
Compare
518a60d
to
67872fb
Compare
67872fb
to
258ee8b
Compare
/** | ||
* @return array<string>|null | ||
*/ | ||
public function getTos(): ?array; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to be compatible with Workflow, so despite Winzou allows to return only 1 "to", we return an array to to
s.
->arrayNode('state_machine') | ||
->addDefaultsIfNotSet() | ||
->children() | ||
->scalarNode('default_adapter')->defaultValue('winzou_state_machine')->end() | ||
->arrayNode('graphs_to_adapters_mapping') | ||
->useAttributeAsKey('graph_name') | ||
->scalarPrototype()->end() | ||
->end() | ||
->end() | ||
->end() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we shouldn't deprecate this config immediately after adding it
Thank you, Jacob! 🎉 |
State machine adapters are configurable now!
It means we can enable Symfony Workflow one by one for our graphs :).