Skip to content

Commit a560853

Browse files
bug symfony#52683 [Serializer] Fix constructor deserialization path (mtarld)
This PR was merged into the 5.4 branch. Discussion ---------- [Serializer] Fix constructor deserialization path | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#44925 | License | MIT This fix doesn't have to be upmerged because it already has been covered by symfony#46680. Commits ------- 272bc28 [Serializer] Fix constructor deserialization path
2 parents 32f22e0 + 272bc28 commit a560853

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ protected function denormalizeParameter(\ReflectionClass $class, \ReflectionPara
489489
*/
490490
protected function createChildContext(array $parentContext, string $attribute, ?string $format): array
491491
{
492+
$parentContext['deserialization_path'] = ($parentContext['deserialization_path'] ?? false) ? $parentContext['deserialization_path'].'.'.$attribute : $attribute;
493+
492494
if (isset($parentContext[self::ATTRIBUTES][$attribute])) {
493495
$parentContext[self::ATTRIBUTES] = $parentContext[self::ATTRIBUTES][$attribute];
494496
} else {

0 commit comments

Comments
 (0)