Skip to content

Commit

Permalink
Merge branch '5.4' into 6.4
Browse files Browse the repository at this point in the history
* 5.4:
  [Console][PhpUnitBridge][VarDumper] Fix `NO_COLOR` empty value handling
  [Translation] Fix CSV escape char in `CsvFileLoader` on PHP >= 7.4
  [DoctrineBridge] fix messenger bus dispatch inside an active transaction
  [HttpFoundation] Add tests for uncovered sections
  treat uninitialized properties referenced by property paths as null
  properly set up constraint options
  [ErrorHandler][VarDumper] Remove PHP 8.4 deprecations
  [Core] Fix & Enhance security arabic translation.
  • Loading branch information
nicolas-grekas committed Jul 26, 2024
2 parents 24ca10f + 49b7764 commit ad51051
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DeprecationErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ private static function hasColorSupport()
}

// Follow https://no-color.org/
if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) {
if ('' !== ($_SERVER['NO_COLOR'] ?? getenv('NO_COLOR') ?: '')) {
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions bin/simple-phpunit.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class_exists(\SymfonyExcludeListSimplePhpunit::class, false) && PHPUnit\Util\Bla
}
}

$cmd[0] = sprintf('%s %s --colors=%s', $PHP, escapeshellarg("$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit"), false === $getEnvVar('NO_COLOR') ? 'always' : 'never');
$cmd[0] = sprintf('%s %s --colors=%s', $PHP, escapeshellarg("$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit"), '' === $getEnvVar('NO_COLOR', '') ? 'always' : 'never');
$cmd = str_replace('%', '%%', implode(' ', $cmd)).' %1$s';

if ('\\' === \DIRECTORY_SEPARATOR) {
Expand Down Expand Up @@ -461,7 +461,7 @@ class SymfonyExcludeListSimplePhpunit
{
}
}
array_splice($argv, 1, 0, ['--colors='.(false === $getEnvVar('NO_COLOR') ? 'always' : 'never')]);
array_splice($argv, 1, 0, ['--colors='.('' === $getEnvVar('NO_COLOR', '') ? 'always' : 'never')]);
$_SERVER['argv'] = $argv;
$_SERVER['argc'] = ++$argc;
include "$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit";
Expand Down

0 comments on commit ad51051

Please sign in to comment.