Skip to content

Commit 12888c9

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [Console] Readd missing php-doc parameter for constructor Remove polyfills from Yaml and Dotenv [HttpFoundation] Fixed type mismatch Bump Symfony version to 4.4.29 Update VERSION for 4.4.28 Update CHANGELOG for 4.4.28
2 parents f0fcb34 + 2b078ef commit 12888c9

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Dotenv.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function populate(array $values, bool $overrideExistingVars = false): voi
190190
$loadedVars = array_flip(explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? $_ENV['SYMFONY_DOTENV_VARS'] ?? ''));
191191

192192
foreach ($values as $name => $value) {
193-
$notHttpName = !str_starts_with($name, 'HTTP_');
193+
$notHttpName = 0 !== strpos($name, 'HTTP_');
194194
// don't check existence with getenv() because of thread safety issues
195195
if (!isset($loadedVars[$name]) && (!$overrideExistingVars && (isset($_ENV[$name]) || (isset($_SERVER[$name]) && $notHttpName)))) {
196196
continue;
@@ -427,7 +427,7 @@ private function skipEmptyLines()
427427

428428
private function resolveCommands(string $value, array $loadedVars): string
429429
{
430-
if (!str_contains($value, '$')) {
430+
if (false === strpos($value, '$')) {
431431
return $value;
432432
}
433433

@@ -463,7 +463,7 @@ private function resolveCommands(string $value, array $loadedVars): string
463463

464464
$env = [];
465465
foreach ($this->values as $name => $value) {
466-
if (isset($loadedVars[$name]) || (!isset($_ENV[$name]) && !(isset($_SERVER[$name]) && !str_starts_with($name, 'HTTP_')))) {
466+
if (isset($loadedVars[$name]) || (!isset($_ENV[$name]) && !(isset($_SERVER[$name]) && 0 !== strpos($name, 'HTTP_')))) {
467467
$env[$name] = $value;
468468
}
469469
}
@@ -481,7 +481,7 @@ private function resolveCommands(string $value, array $loadedVars): string
481481

482482
private function resolveVariables(string $value, array $loadedVars): string
483483
{
484-
if (!str_contains($value, '$')) {
484+
if (false === strpos($value, '$')) {
485485
return $value;
486486
}
487487

@@ -516,7 +516,7 @@ private function resolveVariables(string $value, array $loadedVars): string
516516
$value = $this->values[$name];
517517
} elseif (isset($_ENV[$name])) {
518518
$value = $_ENV[$name];
519-
} elseif (isset($_SERVER[$name]) && !str_starts_with($name, 'HTTP_')) {
519+
} elseif (isset($_SERVER[$name]) && 0 !== strpos($name, 'HTTP_')) {
520520
$value = $_SERVER[$name];
521521
} elseif (isset($this->values[$name])) {
522522
$value = $this->values[$name];

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=7.2.5",
20-
"symfony/deprecation-contracts": "^2.1",
21-
"symfony/polyfill-php80": "^1.16"
20+
"symfony/deprecation-contracts": "^2.1"
2221
},
2322
"require-dev": {
2423
"symfony/process": "^4.4|^5.0"

0 commit comments

Comments
 (0)