composer update
This commit is contained in:
10
vendor/symfony/var-dumper/Caster/Caster.php
vendored
10
vendor/symfony/var-dumper/Caster/Caster.php
vendored
@@ -45,7 +45,7 @@ class Caster
|
||||
*
|
||||
* @return array The array-cast of the object, with prefixed dynamic properties
|
||||
*/
|
||||
public static function castObject($obj, string $class, bool $hasDebugInfo = false): array
|
||||
public static function castObject($obj, string $class, bool $hasDebugInfo = false, string $debugClass = null): array
|
||||
{
|
||||
if ($hasDebugInfo) {
|
||||
try {
|
||||
@@ -64,6 +64,7 @@ class Caster
|
||||
|
||||
if ($a) {
|
||||
static $publicProperties = [];
|
||||
$debugClass = $debugClass ?? get_debug_type($obj);
|
||||
|
||||
$i = 0;
|
||||
$prefixedKeys = [];
|
||||
@@ -77,8 +78,8 @@ class Caster
|
||||
if (!isset($publicProperties[$class][$k])) {
|
||||
$prefixedKeys[$i] = self::PREFIX_DYNAMIC.$k;
|
||||
}
|
||||
} elseif (isset($k[16]) && "\0" === $k[16] && 0 === strpos($k, "\0class@anonymous\0")) {
|
||||
$prefixedKeys[$i] = "\0".get_parent_class($class).'@anonymous'.strrchr($k, "\0");
|
||||
} elseif ($debugClass !== $class && 1 === strpos($k, $class)) {
|
||||
$prefixedKeys[$i] = "\0".$debugClass.strrchr($k, "\0");
|
||||
}
|
||||
++$i;
|
||||
}
|
||||
@@ -94,6 +95,9 @@ class Caster
|
||||
if ($hasDebugInfo && \is_array($debugInfo)) {
|
||||
foreach ($debugInfo as $k => $v) {
|
||||
if (!isset($k[0]) || "\0" !== $k[0]) {
|
||||
if (\array_key_exists(self::PREFIX_DYNAMIC.$k, $a)) {
|
||||
continue;
|
||||
}
|
||||
$k = self::PREFIX_VIRTUAL.$k;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user