diff --git a/src/JsonLd/Serializer/ItemNormalizer.php b/src/JsonLd/Serializer/ItemNormalizer.php index f86460683ca..030b550b4c9 100644 --- a/src/JsonLd/Serializer/ItemNormalizer.php +++ b/src/JsonLd/Serializer/ItemNormalizer.php @@ -95,7 +95,7 @@ public function denormalize($data, $class, $format = null, array $context = []) throw new InvalidArgumentException('Update is not allowed for this operation.'); } - $context['object_to_populate'] = $this->iriConverter->getItemFromIri($data['@id'], ['fetch_data' => false] + $context); + $context['object_to_populate'] = $this->iriConverter->getItemFromIri($data['@id'], $context + ['fetch_data' => false]); } return parent::denormalize($data, $class, $format, $context); diff --git a/src/Serializer/AbstractItemNormalizer.php b/src/Serializer/AbstractItemNormalizer.php index 99838afbbbf..c5d9c37d412 100644 --- a/src/Serializer/AbstractItemNormalizer.php +++ b/src/Serializer/AbstractItemNormalizer.php @@ -272,7 +272,7 @@ private function denormalizeRelation(string $attributeName, PropertyMetadata $pr { if (is_string($value)) { try { - return $this->iriConverter->getItemFromIri($value, ['fetch_data' => false] + $context); + return $this->iriConverter->getItemFromIri($value, $context + ['fetch_data' => false]); } catch (InvalidArgumentException $e) { // Give a chance to other normalizers (e.g.: DateTimeNormalizer) } diff --git a/src/Serializer/ItemNormalizer.php b/src/Serializer/ItemNormalizer.php index d051af66bf5..1f8249c2662 100644 --- a/src/Serializer/ItemNormalizer.php +++ b/src/Serializer/ItemNormalizer.php @@ -33,7 +33,7 @@ public function denormalize($data, $class, $format = null, array $context = []) throw new InvalidArgumentException('Update is not allowed for this operation.'); } - $context['object_to_populate'] = $this->iriConverter->getItemFromIri($data['id'], ['fetch_data' => false] + $context); + $context['object_to_populate'] = $this->iriConverter->getItemFromIri($data['id'], $context + ['fetch_data' => false]); } return parent::denormalize($data, $class, $format, $context);