You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #34167 [HttpFoundation] Allow to not pass a parameter to Request::isMethodSafe() (dunglas)
This PR was squashed before being merged into the 4.3 branch.
Discussion
----------
[HttpFoundation] Allow to not pass a parameter to Request::isMethodSafe()
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | n/a
| License | MIT
| Doc PR | n/a
This parameter was already deprecated in Symfony 4. Allowing to not pass it in Symfony 4.3 without triggering a deprecation allows to support both HttpFoundation 4.3 and 4.4, otherwise it's not possible.
Needed to make API Platform compatible with Symfony 5 (api-platform/core#3009)
Commits
-------
e819256 [HttpFoundation] Allow to not pass a parameter to Request::isMethodSafe()
// setting $andCacheable to false should be deprecated in 4.1
1454
+
if (\func_num_args() > 0 && func_get_arg(0)) {
1458
1455
thrownew \BadMethodCallException('Checking only for cacheable HTTP methods with Symfony\Component\HttpFoundation\Request::isMethodSafe() is not supported.');
0 commit comments