Skip to content

Commit 6bb5b29

Browse files
committed
Remove BC layer for HttpFoundation < 6.1
1 parent 9ed9398 commit 6bb5b29

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Authenticator/FormLoginAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function supports(Request $request): bool
7474
{
7575
return ($this->options['post_only'] ? $request->isMethod('POST') : true)
7676
&& $this->httpUtils->checkRequestPath($request, $this->options['check_path'])
77-
&& ($this->options['form_only'] ? 'form' === (method_exists(Request::class, 'getContentTypeFormat') ? $request->getContentTypeFormat() : $request->getContentType()) : true);
77+
&& ($this->options['form_only'] ? 'form' === $request->getContentTypeFormat() : true);
7878
}
7979

8080
public function authenticate(Request $request): Passport

Authenticator/JsonLoginAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function supports(Request $request): ?bool
6666
{
6767
if (
6868
!str_contains($request->getRequestFormat() ?? '', 'json')
69-
&& !str_contains((method_exists(Request::class, 'getContentTypeFormat') ? $request->getContentTypeFormat() : $request->getContentType()) ?? '', 'json')
69+
&& !str_contains($request->getContentTypeFormat() ?? '', 'json')
7070
) {
7171
return false;
7272
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": ">=8.1",
2020
"symfony/deprecation-contracts": "^2.5|^3",
2121
"symfony/security-core": "^6.3|^7.0",
22-
"symfony/http-foundation": "^5.4|^6.0|^7.0",
22+
"symfony/http-foundation": "^6.2|^7.0",
2323
"symfony/http-kernel": "^6.3|^7.0",
2424
"symfony/polyfill-mbstring": "~1.0",
2525
"symfony/property-access": "^5.4|^6.0|^7.0"

0 commit comments

Comments
 (0)