-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Workflow] Add support for storing the marking in a property #50974
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? 10000 Sign in to your account
Conversation
edited
Q | A |
---|---|
Branch? | 6.4 |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
Tickets | fixes #49778 |
License | MIT |
Doc PR |
src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/workflows.xml
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Workflow/Tests/MarkingStore/MethodMarkingStoreTest.php
Outdated
Show resolved
Hide resolved
It'd be great to not have to configure anything to store using either a property or a method. We're able to do so in the form component. Maybe add an ObjectMarkingStore that relies on property-access? Or if we really want to have standalone logic, implement all this in one single class that can do both? |
It cannot work since we have two things : the marking and a context. The property access component can only work with one value So we need to recode everything. Add some cache etc. I'm not sure it really worth it. And anyway, we cannot guess the context property so we Will need to have some convention or configuration anyway |
e09cc57
to
97e97ad
Compare
What about something like that (no need for the "type" option when property is set): marking_store:
property: foo Then:
If people want to get the context, we offer only one option: implementing the setter. This enforces an API that legitimately correlates state+context. |
It make sens to me 👍🏼 we can check everything during the compilation |
3c91773
to
d644e43
Compare
I pushed a whole new implementation. There is no change in the bundle configuration. The current MethodMarkingStore has been updated to support methods or property |
155e7fb
to
93eeca2
Compare
src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php
Outdated
Show resolved
Hide resolved
Thanks for your review. I addressed your comments |
5daf667
to
cd15e71
Compare
src/Symfony/Component/Workflow/MarkingStore/MethodMarkingStore.php
Outdated
Show resolved
Hide resolved
Thank you @lyrixx. |