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 b829a1cCopy full SHA for b829a1c
src/Http/RequestMatcher/UnsafeRequestMatcher.php
@@ -13,11 +13,20 @@
13
14
use Symfony\Component\HttpFoundation\Request;
15
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
16
+use Symfony\Component\HttpKernel\Kernel;
17
18
class UnsafeRequestMatcher implements RequestMatcherInterface
19
{
20
public function matches(Request $request)
21
- return !$request->isMethodSafe(false);
22
+ // hack needed for compatibility with SF 3.4 => 4.3
23
+ // sf 3.4 => isMethodSafe(false)
24
+ // sf 4.3 => isMethodSafe() or isMethodSafe(false)
25
+ // sf 4.4 => isMethodSafe()
26
+ if (Kernel::VERSION_ID >= 40300) {
27
+ return !$request->isMethodSafe();
28
+ } else {
29
+ return !$request->isMethodSafe(false);
30
+ }
31
}
32
0 commit comments