fix
This commit is contained in:
@@ -30,6 +30,7 @@ use Kint\Zval\Representation\Representation;
|
||||
use Kint\Zval\Value;
|
||||
use ReflectionClass;
|
||||
use ReflectionProperty;
|
||||
use UnitEnum;
|
||||
|
||||
class ClassStaticsPlugin extends Plugin
|
||||
{
|
||||
@@ -56,6 +57,11 @@ class ClassStaticsPlugin extends Plugin
|
||||
$consts = [];
|
||||
|
||||
foreach ($reflection->getConstants() as $name => $val) {
|
||||
// Skip enum constants
|
||||
if ($var instanceof UnitEnum && $val instanceof UnitEnum && $o->classname == \get_class($val)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$const = Value::blank($name, '\\'.$class.'::'.$name);
|
||||
$const->const = true;
|
||||
$const->depth = $o->depth + 1;
|
||||
|
||||
+11
-2
@@ -34,6 +34,7 @@ use Kint\Zval\ResourceValue;
|
||||
use Kint\Zval\Value;
|
||||
use ReflectionObject;
|
||||
use stdClass;
|
||||
use TypeError;
|
||||
|
||||
class Parser
|
||||
{
|
||||
@@ -191,6 +192,10 @@ class Parser
|
||||
|
||||
public function childHasPath(InstanceValue $parent, Value $child)
|
||||
{
|
||||
if ('__PHP_Incomplete_Class' === $parent->classname) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ('object' === $parent->type && (null !== $parent->access_path || $child->static || $child->const)) {
|
||||
if (Value::ACCESS_PUBLIC === $child->access) {
|
||||
return true;
|
||||
@@ -434,7 +439,7 @@ class Parser
|
||||
|
||||
$rep = new Representation('Properties');
|
||||
|
||||
if (KINT_PHP74) {
|
||||
if (KINT_PHP74 && '__PHP_Incomplete_Class' != $object->classname) {
|
||||
$rprops = $reflector->getProperties();
|
||||
|
||||
foreach ($rprops as $rprop) {
|
||||
@@ -524,7 +529,11 @@ class Parser
|
||||
}
|
||||
|
||||
$stash = $val;
|
||||
$copy[$i] = $refmarker;
|
||||
try {
|
||||
$copy[$i] = $refmarker;
|
||||
} catch (TypeError $e) {
|
||||
$child->reference = true;
|
||||
}
|
||||
if ($val === $refmarker) {
|
||||
$child->reference = true;
|
||||
$val = $stash;
|
||||
|
||||
@@ -52,6 +52,10 @@ class TimestampPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
if ($var < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (\in_array($var, self::$blacklist, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user