Updates to vendors etc

This commit is contained in:
Chris Hunt
2025-07-11 15:57:48 +01:00
parent d972cbcd0a
commit 8fb6438254
8043 changed files with 248005 additions and 189479 deletions

View File

@@ -28,10 +28,7 @@ use Symfony\Component\VarDumper\Cloner\VarCloner;
*/
abstract class DataCollector implements DataCollectorInterface
{
/**
* @var array|Data
*/
protected $data = [];
protected array|Data $data = [];
private ClonerInterface $cloner;
@@ -58,14 +55,26 @@ abstract class DataCollector implements DataCollectorInterface
/**
* @return callable[] The casters to add to the cloner
*/
protected function getCasters()
protected function getCasters(): array
{
$casters = [
return [
'*' => function ($v, array $a, Stub $s, $isNested) {
if (!$v instanceof Stub) {
$b = $a;
foreach ($a as $k => $v) {
if (\is_object($v) && !$v instanceof \DateTimeInterface && !$v instanceof Stub) {
$a[$k] = new CutStub($v);
if (!\is_object($v) || $v instanceof \DateTimeInterface || $v instanceof Stub) {
continue;
}
try {
$a[$k] = $s = new CutStub($v);
if ($b[$k] === $s) {
// we've hit a non-typed reference
$a[$k] = $v;
}
} catch (\TypeError $e) {
// we've hit a typed reference
}
}
}
@@ -73,8 +82,6 @@ abstract class DataCollector implements DataCollectorInterface
return $a;
},
] + ReflectionCaster::UNSET_CLOSURE_FILE_INFO;
return $casters;
}
public function __sleep(): array
@@ -82,10 +89,7 @@ abstract class DataCollector implements DataCollectorInterface
return ['data'];
}
/**
* @return void
*/
public function __wakeup()
public function __wakeup(): void
{
}