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

Skip to content

[DependencyInjection][Messenger] Add auto-registration for BatchHandlerInterface #44490

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

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

GaryPEGEOT
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR -

@carsonbot carsonbot changed the title [Messenger] [DI] Add auto-registration for BatchHandlerInterface [DI] Add auto-registration for BatchHandlerInterface Dec 7, 2021
@carsonbot carsonbot added this to the 5.4 milestone Dec 7, 2021
@carsonbot carsonbot changed the title [DI] Add auto-registration for BatchHandlerInterface [DependencyInjection][Messenger] Add auto-registration for BatchHandlerInterface Dec 7, 2021
@chalasr
Copy link
Member

chalasr commented Dec 8, 2021

For 6.1? Nevermind.

@fabpot
Copy link
Member

fabpot commented Dec 9, 2021

Thank you @GaryPEGEOT.

@oneNevan
Copy link
Contributor

oneNevan commented Mar 5, 2025

@GaryPEGEOT hi there!

I know it's been a long time, but i'm curious why this change was introduced?
It is stated as a bug fix, but I there is no reference to an issue this PR fixed, so I cannot to figure it out by myself.

I've created an issue #59912, but I'm wondering if I'm missing something..

Do you remember why would we need to autoregister services with BatchIndexHandlerInterface with messenger.message_handler when all other handlers are supposed to be registered manually with #[AsMessageHandler]? What "bug" did you try to fix by doing so? Or maybe it was like "it's handy, so lets autorigister it"?

Thanks!

@OskarStark OskarStark changed the title [DependencyInjection][Messenger] Add auto-registration for BatchHandlerInterface [DependencyInjection][Messenger] Add auto-registration for BatchHandlerInterface Mar 5, 2025
@GaryPEGEOT
Copy link
Contributor Author

@oneNevan it was so a class implementing this interface would be auto-configured with the correct tag. I might be wrong, but I think it was before AsMessageHandler attribute was created.

@oneNevan
Copy link
Contributor

oneNevan commented Mar 5, 2025

@GaryPEGEOT Yes, you are probably right!

Now I recall we previously had MessageHandlerInterface for regular handlers which was deprecated with introduction AsMessageHandler attribute and removed in symfony 7.0
With this change autoregistration of BatchHandlerInterface should have been removed too, but it wasn't

Thank you!

@GaryPEGEOT GaryPEGEOT deleted the patch-4 branch March 5, 2025 12:40
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