Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Workflow] Added new validator to make sure each place has unique translation names#21271

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Nyholm wants to merge4 commits intosymfony:masterfromNyholm:workflow-unique-name

Conversation

@Nyholm
Copy link
Member

QA
Branch?3.2
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PRn/a

A definition where a place that has transitions with the same name is an invalid definition.

invalid1:places:['a', 'b', 'c']transitions:t1:from:ato:bt1:from:ato:cvalid1:places:['a', 'b', 'c']transitions:t1:from:ato:bt2:from:ato:cvalid2:places:['a', 'b', 'c']transitions:t1:from:ato:bt1:from:bto:cvalid3:places:['a', 'b', 'c', 'd']transitions:t1:from:['a', 'b']to:dt2:from:['a', 'b']to:c

FYI@lyrixx

@NyholmNyholm changed the titleAdded new validator to make sure each place has unique translation names[Workflow] Added new validator to make sure each place has unique translation namesJan 13, 2017
Copy link
Member

@lyrixxlyrixx left a comment

Choose a reason for hiding this comment

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

👍

@lyrixxlyrixx added this to the3.2 milestoneJan 13, 2017
@lyrixx
Copy link
Member

Note: It should be merge in 3.2 and not master.

Nyholm reacted with thumbs up emoji

useSymfony\Component\DependencyInjection\Exception\RuntimeException;
useSymfony\Component\Workflow\Validator\DefinitionValidatorInterface;
useSymfony\Component\Workflow\Validator\StateMachineValidator;
useSymfony\Component\Workflow\Validator\UniqueTransitionNameValidator;

Choose a reason for hiding this comment

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

missing composer.json update I guess, for ^3.2.3

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

There is no reference to symfony/workflow at all in the composer.json of the framework bundle. Should I still add one?

@ro0NL
Copy link
Contributor

What about moving it toWorkflowValidator? TheStateMachineValidator already enforces this right?

@Nyholm
Copy link
MemberAuthor

Thank you@ro0NL. You are correct. The StateMachineValidator has this test already but it is missing in the WorkflowValidator.

I will merge this test to the Workflow validator.

@fabpot
Copy link
Member

Looks like a new feature to me, not a bug fix. I think it should be merged in 3.3 instead.

@Nyholm
Copy link
MemberAuthor

Looks like a new feature to me, not a bug fix.

This PR makes sure the Definition is not invalid. That is why I marked it as a "bugfix". But one could argue that all PRs to the Validator as bugfixes... Anyhow.

Since this check exist for theStateMachineValidator, I've updated the PR to include this check in the Workflow validator only.

@nicolas-grekas
Copy link
Member

Generally : any new visible interface => feature.
Now that this just tweaks an edge case behavior only, it may much likely qualify as bug fix :)

Nyholm reacted with thumbs up emoji

@lyrixx
Copy link
Member

For me it's a bug fix too, because if the definition is not valid, the workflow will not work correctly.

@fabpot
Copy link
Member

Thank you@Nyholm.

fabpot added a commit that referenced this pull requestJan 18, 2017
… unique translation names (Nyholm)This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes#21271).Discussion----------[Workflow] Added new validator to make sure each place has unique translation names| Q             | A| ------------- | ---| Branch?       | 3.2| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        | n/aA definition where a place that has transitions with the same name is an invalid definition.```yamlinvalid1:  places: ['a', 'b', 'c']  transitions:    t1:      from: a      to: b    t1:      from: a      to: cvalid1:  places: ['a', 'b', 'c']  transitions:    t1:      from: a      to: b    t2:      from: a      to: cvalid2:  places: ['a', 'b', 'c']  transitions:    t1:      from: a      to: b    t1:      from: b      to: cvalid3:  places: ['a', 'b', 'c', 'd']  transitions:    t1:      from: ['a', 'b']      to: d    t2:      from: ['a', 'b']      to: c```FYI@lyrixxCommits-------eece8ad [Workflow] Added new validator to make sure each place has unique translation names
@fabpotfabpot closed thisJan 18, 2017
@NyholmNyholm deleted the workflow-unique-name branchJanuary 18, 2017 06:02
@fabpotfabpot mentioned this pull requestFeb 6, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@lyrixxlyrixxlyrixx approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.2

Development

Successfully merging this pull request may close these issues.

7 participants

@Nyholm@lyrixx@ro0NL@fabpot@nicolas-grekas@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp