composer update

This commit is contained in:
2019-07-02 01:51:56 +00:00
parent b4a728213d
commit ebb41422f3
616 changed files with 14708 additions and 612 deletions

View File

@@ -48,13 +48,8 @@ class Caster
*/
public static function castObject($obj, $class, $hasDebugInfo = false)
{
if ($hasDebugInfo) {
$a = $obj->__debugInfo();
} elseif ($obj instanceof \Closure) {
$a = [];
} else {
$a = (array) $obj;
}
$a = $obj instanceof \Closure ? [] : (array) $obj;
if ($obj instanceof \__PHP_Incomplete_Class) {
return $a;
}
@@ -88,6 +83,17 @@ class Caster
}
}
if ($hasDebugInfo && \is_array($debugInfo = $obj->__debugInfo())) {
foreach ($debugInfo as $k => $v) {
if (!isset($k[0]) || "\0" !== $k[0]) {
$k = self::PREFIX_VIRTUAL.$k;
}
unset($a[$k]);
$a[$k] = $v;
}
}
return $a;
}