Skip to content

Can't use non-fqcn service id when using ServiceSubscriberInterface. Why? #47344

Answered by MatTheCat
javaDeveloperKid asked this question in Q&A
Discussion options

You must be logged in to vote

From the interface you mention:

Returns an array of service types

app.service.my_service is a service name, not type.

You’ll have to tag your subscriber yourself: https://symfony.com/doc/current/service_container/service_subscribers_locators.html#aliased-services

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by javaDeveloperKid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants