-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] [Workflow] fixed initial place config #20490
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
[FrameworkBundle] [Workflow] fixed initial place config #20490
Conversation
2805702
to
f2b36b1
Compare
@@ -238,6 +238,7 @@ | |||
<xsd:sequence> | |||
<xsd:element name="marking-store" type="marking_store" /> | |||
<xsd:element name="supports" type="xsd:string" minOccurs="1" maxOccurs="unbounded" /> | |||
<xsd:element name="initial_place" type="xsd:string" /> |
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.
should be <xsd:element name="initial_place" type="xsd:string" minOccurs="0" maxOccurs="1" />
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.
Thank you fixed.
f2b36b1
to
94c6d44
Compare
94c6d44
to
b83f547
Compare
I've also fixed the test https://github.com/symfony/symfony/pull/20490/files#diff-aa781e95d1e8284ae37b68430bb2128bR31. |
@@ -20,5 +20,6 @@ class WorkflowValidator implements DefinitionValidatorInterface | |||
{ | |||
public function validate(Definition $definition, $name) | |||
{ | |||
return 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 think I tend to agree with @ro0NL that this method shouldn't return anything. Why is that method empty in the WorkfowValidator
at all?
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.
Ok I just remove this extra commit to keep the focus on the config fix in this 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.
Done.
b83f547
to
c0d54ef
Compare
'type' => $type, | ||
'marking_store' => isset($workflow['marking_store']['type']) ? $workflow['marking_store']['type'] : null, | ||
)) | ||
; |
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.
Not sure if it's really worth making this change. It makes git blame
pretty useless when you try to figure out when a certain change was introduced without much value.
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 agree with @xabbuh
@@ -238,6 +238,7 @@ | |||
<xsd:sequence> | |||
<xsd:element name="marking-store" type="marking_store" /> | |||
<xsd:element name="supports" type="xsd:string" minOccurs="1" maxOccurs="unbounded" /> | |||
<xsd:element name="initial_place" type="xsd:string" minOccurs="0" maxOccurs="1" /> |
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.
should be an attribute, not a child tag
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.
Fixed, thanks
c0d54ef
to
a5a6a3e
Compare
@@ -235,6 +235,7 @@ | |||
</xsd:complexType> | |||
|
|||
<xsd:complexType name="workflow"> | |||
<xsd:attribute name="initial_place" type="xsd:string" /> |
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 would move it after the sequence next to the already existing attribute.
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.
Missed that, thanks!
a5a6a3e
to
7081c92
Compare
'type' => $type, | ||
'marking_store' => isset($workflow['marking_store']['type']) ? $workflow['marking_store']['type'] : null, | ||
)) | ||
; |
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 agree with @xabbuh
@HeahDude Could you finish this one? I want to merge it asap. |
@@ -242,6 +242,7 @@ | |||
<xsd:element name="transitions" type="transitions" /> | |||
</xsd:sequence> | |||
<xsd:attribute name="name" type="xsd:string" /> | |||
<xsd:attribute name="initial_place" type="xsd:string" /> |
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.
the attribute name should use a dash in XML, not an underscore
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.
fixed
7081c92
to
91237c9
Compare
@lyrixx done! |
👍 |
Good catch, thanks @HeahDude. |
…(HeahDude) This PR was merged into the 3.2-dev branch. Discussion ---------- [FrameworkBundle] [Workflow] fixed initial place config | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20458 (comment) | License | MIT | Doc PR | ~ Commits ------- 91237c9 [FrameworkBundle] [Workflow] Fixed initial place config
Uh oh!
There was an error while loading. Please reload this page.