We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2be2458 commit 458a367Copy full SHA for 458a367
src/Http/RequestMatcher/UnsafeRequestMatcher.php
@@ -18,6 +18,14 @@ class UnsafeRequestMatcher implements RequestMatcherInterface
18
{
19
public function matches(Request $request)
20
21
- return !$request->isMethodSafe(false);
+ // hack needed for compatibility with SF 3.4 => 4.3
22
+ // sf 3.4 => isMethodSafe(false)
23
+ // sf 4.3 => isMethodSafe() or isMethodSafe(false)
24
+ // sf 4.4 => isMethodSafe()
25
+ if (method_exists($request, 'getPreferredFormat')) {
26
+ return !$request->isMethodSafe();
27
+ } else {
28
+ return !$request->isMethodSafe(false);
29
+ }
30
}
31
0 commit comments