8000 fixed leftover deprecations PHP 8.1 · symfony/symfony@86934e6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 86934e6

Browse files
committed
fixed leftover deprecations PHP 8.1
1 parent 653e215 commit 86934e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Asset/VersionStrategy/JsonManifestVersionStrategy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function applyVersion(string $path)
6262
private function getManifestPath(string $path): ?string
6363
{
6464
if (null === $this->manifestData) {
65-
if (null !== $this->httpClient && 0 === strpos(parse_url($this->manifestPath, \PHP_URL_SCHEME), 'http')) {
65+
if (null !== $this->httpClient && ($scheme = parse_url($this->manifestPath, \PHP_URL_SCHEME)) && 0 === strpos($scheme, 'http')) {
6666
try {
6767
$this->manifestData = $this->httpClient->request('GET', $this->manifestPath, [
6868
'headers' => ['accept' => 'application/json'],

src/Symfony/Component/Security/Http/Authenticator/JsonLoginAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function __construct(HttpUtils $httpUtils, UserProviderInterface $userPro
7070

7171
public function supports(Request $request): ?bool
7272
{
73-
if (false === strpos($request->getRequestFormat(), 'json') && false === strpos($request->getContentType(), 'json')) {
73+
if (false === strpos($request->getRequestFormat() ?? '', 'json') && false === strpos($request->getContentType() ?? '', 'json')) {
7474
return false;
7575
}
7676

0 commit comments

Comments
 (0)
0