Skip to content
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

[Workflow] buildTransitionBlockerList contains meaningles if block #28429

Closed
Tetragramat opened this issue Sep 10, 2018 · 3 comments
Closed

[Workflow] buildTransitionBlockerList contains meaningles if block #28429

Tetragramat opened this issue Sep 10, 2018 · 3 comments
Labels

Comments

@Tetragramat
Copy link
Contributor

Symfony version(s) affected: 4.1.4

Description
This line does not make any sense. https://github.com/symfony/symfony/blob/v4.1.4/src/Symfony/Component/Workflow/Workflow.php#L122

Possible Solution
Replace continue with break and negate condition or remove if block completelly.

@xabbuh
Copy link
Member

xabbuh commented Sep 11, 2018

I think that's just some bad copy and paste when the feature was implemented. Would you like to send a PR changing it?

@Tetragramat
Copy link
Contributor Author

I'm not sure how exactly workflow works. There are multiple possible fixes depending on how many same name transitions are allowed.
So I will leave it to someone who knows.

@lyrixx
Copy link
Member

lyrixx commented Nov 8, 2018

Hello, indeed this is a typo But the fix is not trivial because the code have to make a decision based on a subjective decision.
See #29140

lyrixx added a commit that referenced this issue Nov 13, 2018
…ny transition are enabled (Tetragramat, lyrixx)

This PR was merged into the 4.1 branch.

Discussion
----------

[Workflow] Fixed bug of buildTransitionBlockerList when many transition are enabled

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28429 #28432 #28493
| License       | MIT
| Doc PR        |

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

732f343 [Workflow] Made code simpler
db69ccc method buildTransitionBlockerList returns TransitionBlockerList of expected transition
@lyrixx lyrixx closed this as completed Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants