Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | yes |
BC Break report? | no |
RFC? | no |
Symfony version | 2.8 - 3.x |
When using PropertyNormalizer on a nested object that has objects which use inheritance the parent class properties arent normalized.
The $reflectionObject in extractAttributes() doesnt get the private properties of the parent class.
This is normal behaviour of the PHP reflection.
However as the PropertyNormalizer doesnt respect private settings of properties anyway, i think it should be default that it also gets the private properties of the parent class.
Therefor extractAttributes() should recursivly call $reflectionObject->getParentClass()->getProperties() to return all properties.
WDYT @dunglas ?