Merge pull request #1282 from WhiteEagle88/fix_1276

Fixed #1276: Symfony Serializer Groups cause Exception while parsing
This commit is contained in:
Guilhem N 2018-04-05 16:00:15 +02:00 committed by GitHub
commit ff590b013c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,8 +63,8 @@ class ObjectModelDescriber implements ModelDescriberInterface, ModelRegistryAwar
$property = $properties->get($annotationsReader->getPropertyName($reflectionProperty, $propertyName));
$groups = $model->getGroups();
if (isset($groups[$property]) && is_array($groups[$property])) {
$groups = $model->getGroups()[$property];
if (isset($groups[$propertyName]) && is_array($groups[$propertyName])) {
$groups = $model->getGroups()[$propertyName];
}
$annotationsReader->updateProperty($reflectionProperty, $property, $groups);