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:
Nicolas Grekas 2019-07-23 10:33:50 +02:00
commit 90acd03c13
1 changed files with 3 additions and 9 deletions

View File

@ -49,17 +49,11 @@ class Stub
$properties = [];
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) {
if ($v->isStatic()) {
unset($defaultProperties[$v->name]);
} elseif (!isset($defaultProperties[$v->name])) {
$defaultProperties[$v->name] = null;
}
foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) {
unset(self::$defaultProperties[$c][$k]);
}
self::$defaultProperties[$c] = $defaultProperties;
}
foreach (self::$defaultProperties[$c] as $k => $v) {