symfony / demo

Symfony Demo Application
https://symfony.com/
MIT License
2.46k stars 1.61k forks source link

Use `#[Autowire]` attribute instead of Yaml config #1461

Closed GromNaN closed 9 months ago

GromNaN commented 9 months ago

I'm not sure this is something you want to do: replacing Yaml config for attribute for class alias, to use the #[Autowire] attribute available since Symfony 6.1.

I did the change, so let you decide if that's good or not for the demo.

javiereguiluz commented 9 months ago

Thanks Jérôme. I like this a lot. However, while merging I reverted the change related to autowiring the LogoutUrlGenerator service.

It looked a bit weird to me. Also, after seeing this pull request from yours: https://github.com/symfony/symfony/pull/52833 this might be a thing of the past in the next Symfony version.

Thanks!