minor #32672 [VarDumper] revert private properties handling (xabbuh)
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] revert private properties handling
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
9bad90578a
revert private properties handling
This commit is contained in:
commit
90acd03c13
@ -49,17 +49,11 @@ class Stub
|
|||||||
$properties = [];
|
$properties = [];
|
||||||
|
|
||||||
if (!isset(self::$defaultProperties[$c = \get_class($this)])) {
|
if (!isset(self::$defaultProperties[$c = \get_class($this)])) {
|
||||||
$defaultProperties = get_class_vars($c);
|
self::$defaultProperties[$c] = get_class_vars($c);
|
||||||
|
|
||||||
foreach ((new \ReflectionClass($c))->getProperties(\ReflectionProperty::IS_PUBLIC) as $v) {
|
foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) {
|
||||||
if ($v->isStatic()) {
|
unset(self::$defaultProperties[$c][$k]);
|
||||||
unset($defaultProperties[$v->name]);
|
|
||||||
} elseif (!isset($defaultProperties[$v->name])) {
|
|
||||||
$defaultProperties[$v->name] = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self::$defaultProperties[$c] = $defaultProperties;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (self::$defaultProperties[$c] as $k => $v) {
|
foreach (self::$defaultProperties[$c] as $k => $v) {
|
||||||
|
Reference in New Issue
Block a user