diff --git a/src/Util/Filter/Consolidation.php b/src/Util/Filter/Consolidation.php index 83afc65..04d6244 100644 --- a/src/Util/Filter/Consolidation.php +++ b/src/Util/Filter/Consolidation.php @@ -1157,9 +1157,23 @@ public static function debugInfo( bool $detectParent = true, ): array { $regexP = $regexP && DataType::isValidRegExP($regexP) ? $regexP : null; - $reflectionObject = new ReflectionObject($object); + $current = new ReflectionObject($object); + + $properties = []; + foreach ($current->getProperties() as $property) { + $properties[$property->getName()] = $property; + } + + while ($current = $current->getParentClass()) { + foreach ($current->getProperties() as $property) { + if (!isset($properties[$property->getName()])) { + $properties = [$property->getName() => $property] + $properties; + } + } + } + $info = []; - foreach ($reflectionObject->getProperties() as $property) { + foreach ($properties as $property) { // no display if not initialized if ($property->isStatic() || !$property->isInitialized($object) @@ -1185,6 +1199,7 @@ public static function debugInfo( : $key ); } + $info[$keyItem] = $value; if ($detectParent && in_array($key, $excludeKeys)) { continue;