8000 [Serializer] Pass the context to AbstractObjectNormalizer::supportsDe… · Bilge/symfony@b5d9b3b · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit b5d9b3b

Browse files
committed
[Serializer] Pass the context to AbstractObjectNormalizer::supportsDenormalization
1 parent 9ac3a7e commit b5d9b3b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Component/Serializer/Normalizer/AbstractObjectNormalizer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,9 @@ private function validateAndDenormalize($currentClass, $attribute, $data, $forma
267267
throw new LogicException(sprintf('Cannot denormalize attribute "%s" for class "%s" because injected serializer is not a denormalizer', $attribute, $class));
268268
}
269269

270-
if ($this->serializer->supportsDenormalization($data, $class, $format)) {
271-
return $this->serializer->denormalize($data, $class, $format, $this->createChildContext($context, $attribute));
270+
$childContext = $this->createChildContext($context, $attribute);
271+
if ($this->serializer->supportsDenormalization($data, $class, $format, $childContext)) {
272+
return $this->serializer->denormalize($data, $class, $format, $childContext);
272273
}
273274
}
274275

0 commit comments

Comments
 (0)
0