-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
workflow_marked_places()
doesn't handle property marking_store.property
#34092
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
Comments
The bug is caused by the workflow configuration : the deprecation warning is not clear (for me) and it is thrown because the configuration key Replacing marking_store:
type: single_state By marking_store:
type: method makes everything fine : no more deprecation warning, no more So I'm not sure this is a bug, but maybe the deprecation message can be more understandable ? At least documentation must be fixed. The following paragraph is deprecated and does not mention the
|
Hello. Indeed this is an issue with the documentation. You have 2 options: The old way: marking_store:
type: single_state
arguments: ['state'] The new way: marking_store:
type: method
property: state I saw you open a PR in the doc thanks for that 👍 I also fixed another bug in the doc And I also open a PR to forbid such situation |
Note: In symfony 5.0, all this confusion will be removed. You can read more about it on the blog |
…perty' key (lyrixx) This PR was merged into the 4.3 branch. Discussion ---------- [Workflow] Made the configuration more robust for the 'property' key | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #34092 | License | MIT | Doc PR | Commits ------- 0c31ff0 [Workflow] Made the configuration more robust for the 'property' key
Thank you, it is my first use of this component. I wonder why I didn't use it sooner ! |
…yrixx) This PR was merged into the 4.3 branch. Discussion ---------- [Workflow] Fixed PHP config of workflow marking store ref symfony/symfony#34092 Commits ------- 019d1f5 [Workflow] Fixed PHP config of workflow marking store
Symfony version(s) affected: 4.3.5
Description
Calling Twig bridge
workflow_marked_places()
on a workflow using custommarking_store.property
, with an entity which don't havegetMarking()
getter raise an error.How to reproduce
workflow_marked_places
Possible Solution
The bridge try to call
getMarking()
on my entity instead ofgetStatus()
. If I had agetMarking()
in my entity wich give the status field it's OK. But I think I shouldn't have this getter in my entity as I don't have a$marking
property...Traces and warning below may help you...
Additional context
The error and trace:
The Workflow component throw a deprecation warning:
The text was updated successfully, but these errors were encountered: