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] Allow tagged controllers in ControllerResolver#53985

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

Merged
nicolas-grekas merged 1 commit intosymfony:6.4frommarein:allow-tagged-controllers-in-controller-resolver
Feb 26, 2024
Merged

[HttpKernel] Allow tagged controllers in ControllerResolver#53985

nicolas-grekas merged 1 commit intosymfony:6.4frommarein:allow-tagged-controllers-in-controller-resolver
Feb 26, 2024

Conversation

marein
Copy link
Contributor

@mareinmarein commentedFeb 17, 2024
edited
Loading

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#52471
LicenseMIT

If the request attribute_check_controller_is_allowed is set, onlyTemplateController, children ofAbstractController and controllers that have the attribute#[AsController] are allowed by default. This change also adds controllers tagged withcontroller.service_arguments to the mix. It allows them to be used with different fragment renderers (e.g.esi andssi) without having to add any of the above conditions.

This pull request is a follow up ofthis discussion.

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.1 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@nicolas-grekas
Copy link
Member

Thanks for the PR. Did you consider adding the logic to RegisterControllerArgumentLocatorsPass instead of adding a new pass?

@nicolas-grekasnicolas-grekas modified the milestones:7.0,6.4Feb 19, 2024
@marein
Copy link
ContributorAuthor

Yes, but sinceRegisterControllerArgumentLocatorsPass is already quite complex, its functionality seems independent and there's no performance penalty, I moved it to a new class. But I just took another look at it and saw that a few cases are missing in the new pass, e.g.$class = $parameterBag->resolveValue($class);. I don't have a strong opinion, so I'd roll with your suggestion.

@nicolas-grekas
Copy link
Member

I'm for moving this into RegisterControllerArgumentLocatorsPass and adding tests only to the HttpKernel components, so that we don't have cross-packages issues in the CI. Works for you?

@marein
Copy link
ContributorAuthor

Done. Failing8.3 test shouldn't be related. I'd suggest adding a functional test, like in the first commit, toFrameworkBundle in7.1 as this would have caught the bug. Let me know if I should open a pull request once everything is merged.

Should I fix thefabbot.io suggestion? It's unrelated to the changes. Guess it's safe to do so.

@nicolas-grekas
Copy link
Member

Let's ignore fabbot indeed here. Can you please rebase for 6.4? Then OK for me for the integration tests. You'll then need to bump http-kernel to ^6.4.4 in the composer.json of framework-bundle

marein reacted with thumbs up emoji

@mareinmarein changed the base branch from7.0 to6.4February 20, 2024 19:58
@nicolas-grekas
Copy link
Member

Thank you@marein.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

3 participants
@marein@carsonbot@nicolas-grekas

[8]ページ先頭

©2009-2025 Movatter.jp