Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Workflow] Fix eventsToDispatch parameter setup for StateMachine #44510

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

goodjinny
Copy link
Contributor

@goodjinny goodjinny commented Dec 8, 2021

Q A
Branch? 5.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets see description
License MIT
Doc PR N/A

Using state_machine type of the workflow in the project have mentioned that workflow events still propagated with events_to_dispatch: [] parameter. But this bug does not appear for workflow type.

Current pull request fixes that bug by adding $eventsToDispatch parameter initialization for StateMachine class.

Before fixing (state_machine with events_to_dispatch: []):
Screenshot from 2021-12-08 10-55-51

After fixing (state_machine with events_to_dispatch: []);
Screenshot from 2021-12-08 10-54-58

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.1 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@goodjinny goodjinny changed the base branch from 5.4 to 4.4 December 8, 2021 17:45
@goodjinny goodjinny changed the base branch from 4.4 to 5.4 December 8, 2021 17:46
@goodjinny
Copy link
Contributor Author

goodjinny commented Dec 8, 2021

I have found out that the lowest branch where this fix can be applied is 5.2. Should I close this PR and create the new one for the 5.2 branch?

@chalasr
Copy link
Member

chalasr commented Dec 8, 2021

5.2 is not maintained anymore, so 5.3 is probably the lowest maintained branch where this applies.
Assuming you have a remote pointing to this repo named upstream, you can just change your base branch using the Edit button on your PR title, then on your machine run git rebase --onto=upstream/5.3 on your branch and finally git push --force.

@goodjinny goodjinny changed the base branch from 5.4 to 5.3 December 8, 2021 18:34
@goodjinny goodjinny force-pushed the fix/workflow-events-to-dispatch-parameter-setup-for-state-machine branch from ce8e74e to ca38501 Compare December 8, 2021 18:42
@goodjinny
Copy link
Contributor Author

goodjinny commented Dec 8, 2021

Thank you @chalasr! Done.

Could you review it again?

@ogizanagi ogizanagi modified the milestones: 5.4, 5.3 Dec 8, 2021
@fabpot
Copy link
Member

fabpot commented Dec 15, 2021

Thank you @goodjinny.

@fabpot fabpot merged commit 5e954d6 into symfony:5.3 Dec 15, 2021
@fabpot fabpot mentioned this pull request Dec 29, 2021
This was referenced Dec 29, 2021
@DoctorBryson
Copy link

After updating to 5.4.2 this update prevented the state machine to work at all, broke in our integration tests. Got to revert to 5.4.0 until a fix is there I guess.

@fancyweb
Copy link
Contributor

Hello @DoctorBryson, please create a new issue with a reproducer, thanks.

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.

8 participants