8000 Recursive denormalize with property info by mihai-stancu · Pull Request #17193 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Recursive denormalize with property info #17193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
[Serializer] Fix annotation loader
  • Loading branch information
dunglas committed Dec 22, 2015
commit dd25bc18a91b50b3d62053b93a97a207c4aa5301
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ public function loadClassMetadata(ClassMetadataInterface $classMetadata)
}

$accessorOrMutator = preg_match('/^(get|is|has|set)(.+)$/i', $method->name, $matches);
$attributeName = lcfirst($matches[2]);

if (isset($attributesMetadata[$attributeName])) {
$attributeMetadata = $attributesMetadata[$attributeName];
} else {
$attributesMetadata[$attributeName] = $attributeMetadata = new AttributeMetadata($attributeName);
$classMetadata->addAttributeMetadata($attributeMetadata);
if ($accessorOrMutator) {
$attributeName = lcfirst($matches[2]);

if (isset($attributesMetadata[$attributeName])) {
$attributeMetadata = $attributesMetadata[$attributeName];
} else {
$attributesMetadata[$attributeName] = $attributeMetadata = new AttributeMetadata($attributeName);
$classMetadata->addAttributeMetadata($attributeMetadata);
}
}

foreach ($this->reader->getMethodAnnotations($method) as $annotation) {
Expand Down
0