-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Workflow] Fixed dumping when many transition with same name exist #31331
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
Conversation
|
Failure are not related |
|
Thank you @lyrixx. |
…me exist (lyrixx)
This PR was merged into the 3.4 branch.
Discussion
----------
[Workflow] Fixed dumping when many transition with same name exist
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no>
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
With this configuration:
```yaml
framework:
workflows:
foobar:
type: workflow
supports:
- stdClass
initial_place: a
places:
- a
- b
- c
- cancelled
transitions:
- name: a-b
from: a
to: b
- name: b-c
from: b
to: c
- name: cancel
from: a
to: cancelled
- name: cancel
from: b
to: cancelled
- name: cancel
from: c
to: cancelled
```
before:

After:

Commits
-------
312a456 [Workflow] Fixed dumping when many transition with same name exist
| foreach ($transitions as $place) { | ||
| $code .= sprintf(" transition_%s [label=\"%s\", shape=box%s];\n", $this->dotize($place['name']), $place['name'], $this->addAttributes($place['attributes'])); | ||
| foreach ($transitions as $i => $place) { | ||
| $code .= sprintf(" transition_%d [label=\"%s\", shape=box%s];\n", $this->dotize($i), $place['name'], $this->addAttributes($place['attributes'])); |
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.
@lyrixx We could remove the call to dotize here as $i is always an integer, right?
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.
Nevermind, in 4.2, we are using a hash, so a string (so I'm going to change %d to %s in 4.2).
|
@ruudk Because this graph is not accurate. According to this representation the I hope it's more clear :) |

With this configuration:
before:

After:
