Skip to content

[FrameworkBundle] Add support for setting headers to TemplateController::__invoke() #58464

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

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Oct 4, 2024

Q A
Branch? 7.2
Bug fix? yes
New feature? no
Deprecations? no
Issues -
License MIT

Followup to #54678

Looks like I forgot to add it to the __invoke() method, 🤦

@stof
Copy link
Member

stof commented Oct 4, 2024

Maybe we could add a test using Reflection to compare the signature of both methods, to avoid such mistake in the future when adding new features in it (as the test would force you to add the new argument in the other method)

@HypeMC HypeMC force-pushed the add-headers-to-template-controller branch from a512c2f to 90cb6b9 Compare October 4, 2024 17:27
@HypeMC
Copy link
Contributor Author

HypeMC commented Oct 4, 2024

Maybe we could add a test using Reflection to compare the signature of both methods, to avoid such mistake in the future when adding new features in it (as the test would force you to add the new argument in the other method)

@stof Good idea, done https://github.com/symfony/symfony/compare/a512c2fb64e896814844fb5e6344358f087043f6..90cb6b958a1dcadb80a5c08672e43a94d33ef99d

@fabpot
Copy link
Member

fabpot commented Oct 6, 2024

Thank you @HypeMC.

@fabpot fabpot merged commit 15ebad5 into symfony:7.2 Oct 6, 2024
9 of 10 checks passed
@HypeMC HypeMC deleted the add-headers-to-template-controller branch October 6, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants