Skip to content

Commit

Permalink
Merge branch '7.0' into 7.1
Browse files Browse the repository at this point in the history
* 7.0:
  [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
  move adding detailed JSON error messages to the validate phase
  [Profiler] Add word wrap in tables in dialog to see all the text
  [Core] Fix & Enhance security arabic translation.
  [HttpFoundation] Add tests for `MethodRequestMatcher` and `SchemeRequestMatcher`
  • Loading branch information
nicolas-grekas committed Jul 26, 2024
2 parents 5857c57 + 3b5bed5 commit 86af461
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 @@ -143,16 +143,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 @@ -294,9 +290,6 @@ public static function castEntity(\DOMEntity|\Dom\Entity $dom, array $a, Stub $s
'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 @@ -587,7 +587,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 86af461

Please sign in to comment.