Skip to content
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

[FrameworkBundle] Enable controller service with #[Route] attribute #20839

Open
fabpot opened this issue Mar 29, 2025 · 1 comment
Open

[FrameworkBundle] Enable controller service with #[Route] attribute #20839

fabpot opened this issue Mar 29, 2025 · 1 comment
Milestone

Comments

@fabpot
Copy link
Member

fabpot commented Mar 29, 2025

Q A
Feature PR symfony/symfony#60081
PR author(s) @GromNaN
Merged in 7.3

We created this issue to not forget to document this new feature. We would really appreciate if you can help us with this task. If you are not sure how to do it, please ask us and we will help you.

To fix this issue, please create a PR against the 7.3 branch in the symfony-docs repository.

Thank you! 😃

@fabpot fabpot added this to the 7.3 milestone Mar 29, 2025
@GromNaN
Copy link
Member

GromNaN commented Mar 31, 2025

Update How to Define Controllers as Services to show that, by default, every service that uses the #[Route] attribute is registered as a controller (public, non-lazy, and service argument injection). #[AsController] attribute is necessary only when routes are defined in Yaml/Xml/PHP config files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants