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

Consolidate the route definitions in invokable controllers #7232

Merged
merged 2 commits into from
May 23, 2024

Conversation

leofeyer
Copy link
Member

Follow-up on #7227

@leofeyer leofeyer added the bug label May 22, 2024
@leofeyer leofeyer added this to the 4.13 milestone May 22, 2024
@leofeyer leofeyer self-assigned this May 22, 2024
@leofeyer leofeyer requested a review from fritzmg May 22, 2024 13:24
fritzmg
fritzmg previously approved these changes May 22, 2024
Copy link
Contributor

@fritzmg fritzmg left a comment

Choose a reason for hiding this comment

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

But as I mentioned in #7227 - wouldn't it be better to consolidate the two @Route definitions into one on the class itself?

@leofeyer
Copy link
Member Author

to consolidate the two @Route definitions into one on the class itself?

Yes, although I‘m not sure if it should be at class or method level. Are there any best practices for this in Symfony?

@fritzmg
Copy link
Contributor

fritzmg commented May 23, 2024

Are there any best practices for this in Symfony?

In the invokable controllers example they use it on the class level.

Irrespective of the Symfony example I think it should be consistent with how we use annotations and attributes everywhere else - which means class level when using __invoke().

@leofeyer
Copy link
Member Author

Changed in 366a331.

@leofeyer leofeyer changed the title Fix the inconsistent _store_referrer configuration Consolidate the route definitions in invokable controllers May 23, 2024
@leofeyer leofeyer merged commit 73331f2 into contao:4.13 May 23, 2024
18 checks passed
@leofeyer leofeyer deleted the fix/store-referrer branch May 23, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants