Skip to content

Commit a560853

Browse files
bug #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 #44925 | License | MIT This fix doesn't have to be upmerged because it already has been covered by #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

Lines changed: 2 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy