-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore #30551
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
Conversation
lyrixx
commented
Mar 13, 2019
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | yes |
Tests pass? | yes |
Fixed tickets | |
License | MIT |
Doc PR |
7b982c8
to
a71a233
Compare
src/Symfony/Component/Workflow/MarkingStore/MultipleStateMarkingStore.php
Outdated
Show resolved
Hide resolved
cde1f17
to
e95c3a4
Compare
@nicolas-grekas I don't understand the failure.
I do not use anymore Do you have an idea ? |
The bridge 4.2 is loaded with workflow 4.3 and this fails. |
8e34c44
to
a2c4ffb
Compare
Okay. Got it. old components are tested against master (this PR) (see this ) |
81c0274
to
262b9eb
Compare
This PR is now ready |
src/Symfony/Component/Workflow/MarkingStore/MultipleStateMarkingStore.php
Outdated
Show resolved
Hide resolved
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.
+1 with minor comments, thanks.
262b9eb
to
bb776b7
Compare
…Store in favor of MethodMarkingStore
bb776b7
to
4d58beb
Compare
…eStateMarkingStore in favor of MethodMarkingStore (lyrixx) This PR was merged into the 4.3-dev branch. Discussion ---------- [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 4d58beb [Workflow] Deprecate MultipleStateMarkingStore and SingleStateMarkingStore in favor of MethodMarkingStore
marking_store: | ||
type: method | ||
arguments: | ||
- true |
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 am coming to this late because it was merged yesterday, but in my opinion the DX of this change is not good.
Reading the YAML config file, the meaning of this first argument is not clear (what does true
mean?).
For specifying a custom property name (as I do) with a multiple state workflow, I now need to remember to do:
framework:
workflows:
article:
marking_store:
type: method
arguments:
- false
- myColumnName
This being YAML, can we use named arguments here? The code would then become:
framework:
workflows:
article:
marking_store:
type: method
arguments:
singleState: false
property: myColumnName
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 fully agree with that I was about to open an issue for it. We should only rely on the type
(workflow or state_machine) and don't care about that argument. so we could simplify by:
framework:
workflows:
article:
type: state_machine
marking_store:
type: method
property: myColumnName
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.
Please don't discuss on closed issues/PR
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.
Yes I've just opened #30656.