[Serializer] ObjectNormalizer: add missing parameters
This commit is contained in:
parent
330c09b390
commit
58ac241c1d
@ -68,14 +68,14 @@ class ObjectNormalizer extends AbstractObjectNormalizer
|
||||
$attributeName = lcfirst(substr($name, 2));
|
||||
}
|
||||
|
||||
if (null !== $attributeName && $this->isAllowedAttribute($object, $attributeName)) {
|
||||
if (null !== $attributeName && $this->isAllowedAttribute($object, $attributeName, $format, $context)) {
|
||||
$attributes[$attributeName] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// properties
|
||||
foreach ($reflClass->getProperties(\ReflectionProperty::IS_PUBLIC) as $reflProperty) {
|
||||
if ($reflProperty->isStatic() || !$this->isAllowedAttribute($object, $reflProperty->name)) {
|
||||
if ($reflProperty->isStatic() || !$this->isAllowedAttribute($object, $reflProperty->name, $format, $context)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user