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 c31566e + 0c17c56 commit a71cc33
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions Caster/DOMCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class DOMCaster
{
private const ERROR_CODES = [
\DOM_PHP_ERR => 'DOM_PHP_ERR',
0 => 'DOM_PHP_ERR',
\DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR',
\DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR',
\DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR',
Expand Down Expand Up @@ -156,16 +156,12 @@ public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, boo
'doctype' => $dom->doctype,
'implementation' => $dom->implementation,
'documentElement' => new CutStub($dom->documentElement),
'actualEncoding' => $dom->actualEncoding,
'encoding' => $dom->encoding,
'xmlEncoding' => $dom->xmlEncoding,
'standalone' => $dom->standalone,
'xmlStandalone' => $dom->xmlStandalone,
'version' => $dom->version,
'xmlVersion' => $dom->xmlVersion,
'strictErrorChecking' => $dom->strictErrorChecking,
'documentURI' => $dom->documentURI ? new LinkStub($dom->documentURI) : $dom->documentURI,
'config' => $dom->config,
'formatOutput' => $dom->formatOutput,
'validateOnParse' => $dom->validateOnParse,
'resolveExternals' => $dom->resolveExternals,
Expand Down Expand Up @@ -277,9 +273,6 @@ public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, bool $i
'publicId' => $dom->publicId,
'systemId' => $dom->systemId,
'notationName' => $dom->notationName,
'actualEncoding' => $dom->actualEncoding,
'encoding' => $dom->encoding,
'version' => $dom->version,
];

return $a;
Expand Down
2 changes: 1 addition & 1 deletion Caster/ExceptionCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ExceptionCaster
\E_USER_ERROR => 'E_USER_ERROR',
\E_USER_WARNING => 'E_USER_WARNING',
\E_USER_NOTICE => 'E_USER_NOTICE',
\E_STRICT => 'E_STRICT',
2048 => 'E_STRICT',
];

private static array $framesCache = [];
Expand Down
2 changes: 1 addition & 1 deletion Dumper/CliDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ private function hasColorSupport(mixed $stream): bool
}

// 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

0 comments on commit a71cc33

Please sign in to comment.