Skip to content

[Workflow] Fixed support of multiple transitions with the same name. #21280

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
Jan 18, 2017

Conversation

lyrixx
Copy link
Member

@lyrixx lyrixx commented Jan 13, 2017

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 -

The previous behavior was underterministic because it took the first
transition during the can and the apply method. But the "first"
does not mean anything. Now the workflown apply all possible transitions
with the same name.

@lyrixx lyrixx changed the title [Workflow] Fixed support of multiple transition with the same name. [Workflow] Fixed support of multiple transitions with the same name. Jan 13, 2017
@MamWayne
Copy link

Well done ;)

@lyrixx lyrixx force-pushed the workflow-apply-multiple-name branch 2 times, most recently from ecb2992 to 53938a5 Compare January 13, 2017 22:36
Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

I like this PR but I think it is missing one test.

Current marking: {a, b}.
You have the following transitions: t1: a->c, t2: b->d. (Both transitions named "foobar")

You should check that {a,b} -> ["foobar"] -> {c,d}.

@lyrixx lyrixx force-pushed the workflow-apply-multiple-name branch from 53938a5 to e80b866 Compare January 14, 2017 16:42
@lyrixx
Copy link
Member Author

lyrixx commented Jan 14, 2017

@Nyholm I added a new test case.

The previous behavior was underterministic because it took the first
transition during the `can` and the `apply` method. But the "first"
does not mean anything. Now the workflow apply all possible
transitions with the same name.
@lyrixx lyrixx force-pushed the workflow-apply-multiple-name branch from e80b866 to edd5431 Compare January 14, 2017 16:43
@nicolas-grekas
Copy link
Member

👍

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Awesome!

@fabpot
Copy link
Member

fabpot commented Jan 15, 2017

This is not strictly a bug fix. I understand that the current behavior is not the "right"/"expected" one, but I don't think this qualifies as something for 3.2. I would recommend to merge it in 3.3 instead.

@lyrixx Can you add a note in the component CHANGELOG about this change?

@lyrixx
Copy link
Member Author

lyrixx commented Jan 16, 2017

IMHO, it should go on 3.2 because it will be impossible for 3.2 users to have the correct behavior, and then when they will upgrade to 3.3, the behavior will be different than what they know.

@lyrixx
Copy link
Member Author

lyrixx commented Jan 16, 2017

Please note that there are not new visible interface, so it's a pure behavioral change

@nicolas-grekas nicolas-grekas added this to the 3.2 milestone Jan 16, 2017
@fabpot
Copy link
Member

fabpot commented Jan 18, 2017

Thank you @lyrixx.

@fabpot fabpot merged commit edd5431 into symfony:3.2 Jan 18, 2017
fabpot added a commit that referenced this pull request Jan 18, 2017
…same name. (lyrixx)

This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] Fixed support of multiple transitions with the same name.

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

---

The previous behavior was underterministic because it took the first
transition during the `can` and the `apply` method. But the "first"
does not mean anything. Now the workflown apply all possible transitions
with the same name.

Commits
-------

edd5431 [Workflow] Fixed support of multiple transition with the same name.
@lyrixx lyrixx deleted the workflow-apply-multiple-name branch January 18, 2017 08:24
@fabpot fabpot mentioned this pull request Feb 6, 2017
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.

6 participants