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] Fix eventsToDispatch parameter setup for StateMachine #44510

Conversation

goodjinny
Copy link

@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

@carsonbot carsonbot commented Dec 8, 2021

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 Dec 8, 2021
@goodjinny goodjinny changed the base branch from 4.4 to 5.4 Dec 8, 2021
@goodjinny
Copy link
Author

@goodjinny 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 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 Dec 8, 2021
@goodjinny goodjinny force-pushed the fix/workflow-events-to-dispatch-parameter-setup-for-state-machine branch from ce8e74e to ca38501 Compare Dec 8, 2021
@goodjinny
Copy link
Author

@goodjinny goodjinny commented Dec 8, 2021

Thank you @chalasr! Done.

Could you review it again?

@ogizanagi ogizanagi removed this from the 5.4 milestone Dec 8, 2021
@ogizanagi ogizanagi added this to the 5.3 milestone Dec 8, 2021
lyrixx
lyrixx approved these changes Dec 14, 2021
fabpot
fabpot approved these changes Dec 15, 2021
@fabpot
Copy link
Member

@fabpot fabpot commented Dec 15, 2021

Thank you @goodjinny.

@fabpot fabpot merged commit 5e954d6 into symfony:5.3 Dec 15, 2021
11 checks passed
@fabpot fabpot mentioned this pull request Dec 29, 2021
@fabpot fabpot mentioned this pull request Dec 29, 2021
@fabpot fabpot mentioned this pull request Dec 29, 2021
@DoctorBryson
Copy link

@DoctorBryson DoctorBryson commented Dec 30, 2021

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

@fancyweb fancyweb commented Dec 30, 2021

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

Successfully merging this pull request may close these issues.

None yet

8 participants