N°5809 Update Symfony artifacts from 6.4.0 to 6.4.2

symfony/console
symfony/dotenv
symfony/framework-bundle
symfony/http-foundation
symfony/http-kernel
symfony/var-dumper
symfony/web-profiler-bundle
This commit is contained in:
Pierre Goiffon
2024-01-26 09:55:51 +01:00
parent ddce3058be
commit dfb5a4875a
110 changed files with 1115 additions and 929 deletions

View File

@@ -151,7 +151,13 @@ EOT
private function getAvailableVars(): array
{
$vars = explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? '');
$dotenvVars = $_SERVER['SYMFONY_DOTENV_VARS'] ?? '';
if ('' === $dotenvVars) {
return [];
}
$vars = explode(',', $dotenvVars);
sort($vars);
return $vars;

View File

@@ -25,7 +25,7 @@ use Symfony\Component\Process\Process;
*/
final class Dotenv
{
public const VARNAME_REGEX = '(?i:[A-Z][A-Z0-9_]*+)';
public const VARNAME_REGEX = '(?i:_?[A-Z][A-Z0-9_]*+)';
public const STATE_VARNAME = 0;
public const STATE_VALUE = 1;
@@ -341,8 +341,8 @@ final class Dotenv
++$this->cursor;
$value = str_replace(['\\"', '\r', '\n'], ['"', "\r", "\n"], $value);
$resolvedValue = $value;
$resolvedValue = $this->resolveVariables($resolvedValue, $loadedVars);
$resolvedValue = $this->resolveCommands($resolvedValue, $loadedVars);
$resolvedValue = $this->resolveVariables($resolvedValue, $loadedVars);
$resolvedValue = str_replace('\\\\', '\\', $resolvedValue);
$v .= $resolvedValue;
} else {
@@ -364,8 +364,8 @@ final class Dotenv
}
$value = rtrim($value);
$resolvedValue = $value;
$resolvedValue = $this->resolveVariables($resolvedValue, $loadedVars);
$resolvedValue = $this->resolveCommands($resolvedValue, $loadedVars);
$resolvedValue = $this->resolveVariables($resolvedValue, $loadedVars);
$resolvedValue = str_replace('\\\\', '\\', $resolvedValue);
if ($resolvedValue === $value && preg_match('/\s+/', $value)) {