Skip to content

[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

Merged
merged 1 commit into from
Nov 15, 2016

Conversation

HeahDude
Copy link
Contributor

@HeahDude HeahDude commented Nov 11, 2016

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 ~

@HeahDude HeahDude changed the title Fix workflow initial place config [FrameworkBundle] [Workflow] minor config and validator fixes Nov 11, 2016
@HeahDude HeahDude force-pushed the fix-workflow-initial-place-config branch from 2805702 to f2b36b1 Compare November 11, 2016 15:42
@@ -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" />
Copy link
Member

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" />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you fixed.

@HeahDude HeahDude force-pushed the fix-workflow-initial-place-config branch from f2b36b1 to 94c6d44 Compare November 11, 2016 16:45
@HeahDude HeahDude force-pushed the fix-workflow-initial-place-config branch from 94c6d44 to b83f547 Compare November 11, 2016 17:04
@HeahDude
Copy link
Contributor Author

@@ -20,5 +20,6 @@ class WorkflowValidator implements DefinitionValidatorInterface
{
public function validate(Definition $definition, $name)
{
return true;
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@HeahDude HeahDude force-pushed the fix-workflow-initial-place-config branch from b83f547 to c0d54ef Compare November 12, 2016 09:55
@HeahDude HeahDude changed the title [FrameworkBundle] [Workflow] minor config and validator fixes [FrameworkBundle] [Workflow]fixed initial place config Nov 12, 2016
@HeahDude HeahDude changed the title [FrameworkBundle] [Workflow]fixed initial place config [FrameworkBundle] [Workflow] fixed initial place config Nov 12, 2016
'type' => $type,
'marking_store' => isset($workflow['marking_store']['type']) ? $workflow['marking_store']['type'] : null,
))
;
Copy link
Member

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.

Copy link
Member

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" />
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks

@HeahDude HeahDude force-pushed the fix-workflow-initial-place-config branch from c0d54ef to a5a6a3e Compare November 12, 2016 16:16
@@ -235,6 +235,7 @@
</xsd:complexType>

<xsd:complexType name="workflow">
<xsd:attribute name="initial_place" type="xsd:string" />
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed that, thanks!

'type' => $type,
'marking_store' => isset($workflow['marking_store']['type']) ? $workflow['marking_store']['type'] : null,
))
;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @xabbuh

@lyrixx
Copy link
Member

lyrixx commented Nov 15, 2016

@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" />
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@HeahDude HeahDude force-pushed the fix-workflow-initial-place-config branch from 7081c92 to 91237c9 Compare November 15, 2016 14:03
@HeahDude
Copy link
Contributor Author

@lyrixx done!

@lyrixx
Copy link
Member

lyrixx commented Nov 15, 2016

👍

@lyrixx
Copy link
Member

lyrixx commented Nov 15, 2016

Good catch, thanks @HeahDude.

@lyrixx lyrixx merged commit 91237c9 into symfony:master Nov 15, 2016
lyrixx added a commit that referenced this pull request Nov 15, 2016
…(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
@HeahDude HeahDude deleted the fix-workflow-initial-place-config branch November 15, 2016 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants