Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f3d272

Browse files
committed
name converter now gets also passed the attributeContext
1 parent 270da97 commit 1f3d272

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,8 @@ protected function instantiateObject(array &$data, string $class, array &$contex
351351
$params = [];
352352
foreach ($constructorParameters as $constructorParameter) {
353353
$paramName = $constructorParameter->name;
354-
$key = $this->nameConverter ? $this->nameConverter->normalize($paramName, $class, $format, $context) : $paramName;
355-
356354
$attributeContext = $this->getAttributeDenormalizationContext($class, $paramName, $context);
355+
$key = $this->nameConverter ? $this->nameConverter->normalize($paramName, $class, $format, $attributeContext) : $paramName;
357356

358357
$allowed = false === $allowedAttributes || \in_array($paramName, $allowedAttributes);
359358
$ignored = !$this->isAllowedAttribute($class, $paramName, $format, $context);

0 commit comments

Comments
 (0)