Skip to content

Commit 3b71d1a

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: fixed leftover deprecations PHP 8.1 [Runtime] fix defining APP_DEBUG when Dotenv is not enabled
2 parents de250a8 + 07a891f commit 3b71d1a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function applyVersion(string $path)
6969
private function getManifestPath(string $path): ?string
7070
{
7171
if (null === $this->manifestData) {
72-
if (null !== $this->httpClient && 0 === strpos(parse_url($this->manifestPath, \PHP_URL_SCHEME), 'http')) {
72+
if (null !== $this->httpClient && ($scheme = parse_url($this->manifestPath, \PHP_URL_SCHEME)) && 0 === strpos($scheme, 'http')) {
7373
try {
7474
$this->manifestData = $this->httpClient->request('GET', $this->manifestPath, [
7575
'headers' => ['accept' => 'application/json'],

src/Symfony/Component/Runtime/SymfonyRuntime.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ public function __construct(array $options = [])
108108
$options['debug'] ?? $options['debug'] = '1' === $_SERVER[$debugKey];
109109
$options['disable_dotenv'] = true;
110110
} else {
111-
$_SERVER[$envKey] ?? $_SERVER[$envKey] = 'dev';
111+
$_SERVER[$envKey] ?? $_SERVER[$envKey] = $_ENV[$envKey] ?? 'dev';
112+
$_SERVER[$debugKey] ?? $_SERVER[$debugKey] = $_ENV[$debugKey] ?? !\in_array($_SERVER[$envKey], (array) ($options['prod_envs'] ?? ['prod']), true);
112113
}
113114

114115
$options['error_handler'] ?? $options['error_handler'] = SymfonyErrorHandler::class;

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)