Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpKernel] Controller Attributes#45457
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
| namespace Symfony\Component\HttpKernel\Attribute; | ||
| /** | ||
| * Marker interface for controller attributes |
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.
For controller argument attributes we decided toremove the marker interface, should we do the same here ?
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.
No marker at all, the same way controller argument metadata works. We might need to introduce aControllerMetadata class to mirror theArgumentMetadata one.
| namespace Symfony\Component\HttpKernel\EventListener; | ||
| use Doctrine\Persistence\Proxy; |
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.
relevant?
nicolas-grekas commentedApr 11, 2022
I'm closing in favor of#46001, which should provide a better starting point for the goal we have. |
… handle attributes on controllers (nicolas-grekas)This PR was squashed before being merged into the 6.2 branch.Discussion----------[HttpKernel] Add `ControllerEvent::getAttributes()` to handle attributes on controllers| Q | A| ------------- | ---| Branch? | 6.2| Bug fix? | no| New feature? | yes| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -Replacing#45457. Paving the way toward#44705Commits-------0f2293c [HttpKernel] Add `ControllerEvent::getAttributes()` to handle attributes on controllers
Uh oh!
There was an error while loading.Please reload this page.
In a continuation of efforts to deprecate SensioFrameworkExtraBundle (#45415), this PR adds a mechanism to parse controller attributes at the request of@nicolas-grekas.
This is a rewrite of theControllerListener from SensioFrameworkExtraBundle with support for annotations dropped.
The only thing I haven't implemented is a configuration option in FrameworkBundle to enable/disable support. I'm thinking of either
framework.controller.controller_attributesorframework.request.controller_attributes, any suggestions?