8000 [Serializer] Fix constructor deserialization path by mtarld · Pull Request #52683 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Serializer] Fix constructor deserialization path #52683

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

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Serializer] Fix constructor deserialization path
  • Loading branch information
mtarld committed Nov 22, 2023
commit 272bc28763da7b1ea5312ba3bab9dd06ada9debc
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,8 @@ protected function denormalizeParameter(\ReflectionClass $class, \ReflectionPara
*/
protected function createChildContext(array $parentContext, string $attribute, ?string $format): array
{
$parentContext['deserialization_path'] = ($parentContext['deserialization_path'] ?? false) ? $parentContext['deserialization_path'].'.'.$attribute : $attribute;

if (isset($parentContext[self::ATTRIBUTES][$attribute])) {
$parentContext[self::ATTRIBUTES] = $parentContext[self::ATTRIBUTES][$attribute];
} else {
Expand Down
0