Named autowiring in Symfony is powerful, but it can also hide a subtle bug. Change a variable name and suddenly your service quietly switches to a different dependency.
In this video, we'll see how that happens with log channels and how to fix it using the #[Target] attribute so your dependencies stay exactly what you expect, and fail loudly when they don't.
To learn more about Symfony Dependency Injection attributes, check out our full course 👉 https://symfonycasts.com/screencast/d...