8000 [Messenger] Resolve handled classes when only method in tag is provided by angelov · Pull Request #44971 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Messenger] Resolve handled classes when only method in tag is provided #44971

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

angelov
Copy link
Contributor
@angelov angelov commented Jan 10, 2022
Q A
Branch? 6.1
Bug fix? no
New feature? yes
Deprecations? no
Tickets /
License MIT
Doc PR /

When tagging Messenger handlers, if the method attribute is set, the compiler pass does not resolve the message type before handling it - it requires the handles attribute to be set as well.

With this PR, the message type is being resolved even if method other than __invoke is being used.

I'm not sure if this is a bug fix or just an improvement :/

@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

@angelov angelov force-pushed the messenger-resolve-message-type-when-custom-method branch from b0c3eae to aedddfe Compare January 10, 2022 19:32
@carsonbot
Copy link

Hey!

I think @monteiro has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@ogizanagi
Copy link
Contributor

I think this should go to 6.1 as a DX improvement. It does not qualify as a bug fix.

@ogizanagi ogizanagi modified the milestones: 5.4, 6.1 Jan 11, 2022
@angelov angelov changed the base branch from 5.4 to 6.1 January 11, 2022 19:16
@angelov angelov changed the base branch from 6.1 to 5.4 January 11, 2022 19:16
@angelov angelov changed the base branch from 5.4 to 6.1 January 11, 2022 19:21
@angelov angelov force-pushed the messenger-resolve-message-type-when-custom-method branch 2 times, most recently from d49d490 to f69f116 Compare January 11, 2022 19:40
@angelov
Copy link
Contributor Author
angelov commented Jan 11, 2022

I think this should go to 6.1 as a DX improvement. It does not qualify as a bug fix.

Thanks! I though the same, but wasn't sure. I updated the PR to point towards 6.1

@angelov angelov force-pushed the messenger-resolve-message-type-when-custom-method branch from ede276e to 8d12870 Compare January 11, 2022 22:38
@angelov
Copy link
Contributor Author
angelov commented Jan 12, 2022

The failures in the checks seem unrelated to me?

@ogizanagi
Copy link
Contributor

@angelov : Could you add an entry about this in the Messenger CHANGELOG.md 6.1 section ?
Also, great first-time contrib 👌🏻

@angelov
Copy link
Contributor Author
angelov commented Jan 13, 2022

@ogizanagi thanks!

Updated the changelog, I hope it's alright.

@ogizanagi ogizanagi force-pushed the messenger-resolve-message-type-when-custom-method branch from d71ec58 to 780b7da Compare January 14, 2022 05:47
@ogizanagi
Copy link
Contributor

Thank you @angelov.

@ogizanagi ogizanagi merged commit e875021 into symfony:6.1 Jan 14, 2022
@angelov angelov deleted the messenger-resolve-message-type-when-custom-method branch January 14, 2022 08:54
@fabpot fabpot mentioned this pull request Apr 15, 2022
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.

5 participants
0