Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Closed

Conversation

@codedmonkey
Copy link
Contributor

@codedmonkeycodedmonkey commentedFeb 17, 2022
edited
Loading

QA
Branch?6.1
Bug fix?no
New feature?yes
Deprecations?no
Tickets#44705
LicenseMIT
Doc PRsymfony/symfony-docs#...

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 eitherframework.controller.controller_attributes orframework.request.controller_attributes, any suggestions?

namespace Symfony\Component\HttpKernel\Attribute;

/**
* Marker interface for controller attributes
Copy link
Contributor

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 ?

codedmonkey reacted with thumbs up emoji
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

relevant?

@nicolas-grekas
Copy link
Member

I'm closing in favor of#46001, which should provide a better starting point for the goal we have.
Thanks for pushing this topic forward!

chalasr added a commit that referenced this pull requestJul 7, 2022
… 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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@jvasseurjvasseurjvasseur left review comments

@ro0NLro0NLro0NL left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.1

Development

Successfully merging this pull request may close these issues.

5 participants

@codedmonkey@nicolas-grekas@jvasseur@ro0NL@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp