Skip to content

Commit ad51051

Browse files
Merge branch '5.4' into 6.4
* 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.
2 parents 24ca10f + 49b7764 commit ad51051

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

DeprecationErrorHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ private static function hasColorSupport()
418418
}
419419

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

bin/simple-phpunit.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ class_exists(\SymfonyExcludeListSimplePhpunit::class, false) && PHPUnit\Util\Bla
371371
}
372372
}
373373

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

377377
if ('\\' === \DIRECTORY_SEPARATOR) {
@@ -461,7 +461,7 @@ class SymfonyExcludeListSimplePhpunit
461461
{
462462
}
463463
}
464-
array_splice($argv, 1, 0, ['--colors='.(false === $getEnvVar('NO_COLOR') ? 'always' : 'never')]);
464+
array_splice($argv, 1, 0, ['--colors='.('' === $getEnvVar('NO_COLOR', '') ? 'always' : 'never')]);
465465
$_SERVER['argv'] = $argv;
466466
$_SERVER['argc'] = ++$argc;
467467
include "$PHPUNIT_DIR/$PHPUNIT_VERSION_DIR/phpunit";

0 commit comments

Comments
 (0)