-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[HttpKernel] Add #[AsController] attribute for declaring standalone controllers on PHP 8
#40555
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
Conversation
#[AsController] attribute for declaring listeners on PHP 8#[AsController] attribute for declaring controllers on PHP 8
#[AsController] attribute for declaring controllers on PHP 8#[AsController] attribute for declaring standalone controllers on PHP 8
|
I think the renaming of other attributes at least deserves being in its own commit rather than being bundled in a commit saying |
yceruto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the As prefix for all attributes, it offers us consistency and as you said better IDE autocompletion.
|
@yceruto for all autoconfiguration attributes, I agree. I would not describe that as |
weaverryan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the As prefix also 👍
@stof my bad, but that's what I meant 😄 ! |
|
Thank you @nicolas-grekas. |
This PR adds an
#[AsController]attribute to allow autoconfiguring controllers even when they don't extendAbstractController. This should allow removing the line aboutcontroller.service_argumentsinservices.yamlto cover this need (but that is noise to most.)