Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
[DependencyInjection] Add a warning about tagged services needing to be after the glob definition#16888
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
I am not sure, but this sounds like a bug to me 🧐 it should not matter in which order you define your services. @nicolas-grekas can you please give your opinion on this? Thanks |
The last comment of the default services.yaml already explains this. |
Indeed 👍 # add more service definitions when explicit configuration is needed# please note that last definitions always *replace* previous ones |
Well I didn't have this comment in my default one 😕 But I still think this comment is also not explicit enough because it's not really clear that the service would be replaced by |
@Tofandel thanks for this contribution. However, instead of adding this message in one of the many articles that show service config, we've decided to add that message in the main article about service config. That's why we've created#17385 to replace this PR. But your PR was great because it made us rethink about this. Thanks! |
…service definitions replace previous ones (javiereguiluz)This PR was merged into the 4.4 branch.Discussion----------[DependencyInjection] [DependencyInjecion] Mention that service definitions replace previous onesReplaces#16888 to add the warning message in the main article about services config.Commits-------c9f83a4 [DependencyInjecion] Mention that service definitions replace previous ones
Uh oh!
There was an error while loading.Please reload this page.
It took me 2hours to debug and figure out why my listener wasn't working while following the doc, when it's just because the tag definition was not being applied
Basically just declaring it like this
When for it to work it needs to be like
This mistake is so easy to make it deserves a proper warning