$attributeMetadata->
setSerializedPath(new PropertyPath((string) $data['serialized_path'
]));
} catch (InvalidPropertyPathException
) { throw new MappingException(sprintf('The "serialized_path" value must be a valid property path in "%s" for the attribute "%s" of the class "%s".',
$this->file,
$attribute,
$classMetadata->
getName()));
} } if (isset($data['ignore'
])) { if (!\
is_bool($data['ignore'
])) { throw new MappingException(sprintf('The "ignore" value must be a boolean in "%s" for the attribute "%s" of the class "%s".',
$this->file,
$attribute,
$classMetadata->
getName()));
} $attributeMetadata->
setIgnore($data['ignore'
]);
} foreach ($data['contexts'
] ??
[] as $line) { $groups =
$line['groups'
] ??
[];
if ($context =
$line['context'
] ?? false
) { $attributeMetadata->
setNormalizationContextForGroups($context,
$groups);
$attributeMetadata->
setDenormalizationContextForGroups($context,
$groups);
} if ($context =
$line['normalization_context'
] ?? false
) {