-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] deprecate not setting http_method_override #45989
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
[FrameworkBundle] deprecate not setting http_method_override #45989
Conversation
->fixXmlConfig('enabled_locale') | ||
->children() | ||
->scalarNode('secret')->end() | ||
->scalarNode('http_method_override') | ||
->booleanNode('http_method_override') |
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.
The only boolean node that wasn't defined as such and missed validation.
->info("Set true to enable support for the '_method' request parameter to determine the intended HTTP method on POST requests. Note: When using the HttpCache, you need to call the method in your front controller instead") | ||
->defaultTrue() | ||
->treatNullLike(false) |
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.
currently setting it to null caused a type error in the FrameworkExtension which is now fixed. making it a boolean node still permits null. so this also ensures that null is transformed to false (instead of true which is the default in boolean node)
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.
LGTM. Please add CHANGELOG+UPGRADE entries
@nicolas-grekas I need to adapt tests don't I? The option needs to be set in alot of functional tests. |
yes indeed |
@nicolas-grekas is there a way to ignore this deprecation notice in Symfony tests when it's self triggered. otherwise I have to explicitly set the http_method_override: false in hundrets of test fixtures. kinda ugly and pointless. |
Nope there's none, and that's on purpose to me: eat our own dog food. We're asking ppl to opt-in, including ourselves. |
Well, users will not be affected when using the recipes. And the people who are, only need to change 1 line. We have to adjust hundrets of unrelated tests. |
8b29d0d
to
9be468f
Compare
e1df1f7
to
a156313
Compare
I fixed the tests and adding changelog/upgrade. This is ready now. |
a156313
to
f9cf24a
Compare
Thank you @Tobion. |
In preparation for changing the default in 7.0.