Skip to content

Commit e2396f6

Browse files
committed
fix override fetch_data context
1 parent 0357a41 commit e2396f6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/JsonLd/Serializer/ItemNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
9595
throw new InvalidArgumentException('Update is not allowed for this operation.');
9696
}
9797

98-
$context['object_to_populate'] = $this->iriConverter->getItemFromIri($data['@id'], ['fetch_data' => false] + $context);
98+
$context['object_to_populate'] = $this->iriConverter->getItemFromIri($data['@id'], $context + ['fetch_data' => false]);
9999
}
100100

101101
return parent::denormalize($data, $class, $format, $context);

src/Serializer/AbstractItemNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ private function denormalizeRelation(string $attributeName, PropertyMetadata $pr
272272
{
273273
if (is_string($value)) {
274274
try {
275-
return $this->iriConverter->getItemFromIri($value, ['fetch_data' => false] + $context);
275+
return $this->iriConverter->getItemFromIri($value, $context + ['fetch_data' => false]);
276276
} catch (InvalidArgumentException $e) {
277277
// Give a chance to other normalizers (e.g.: DateTimeNormalizer)
278278
}

src/Serializer/ItemNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function denormalize($data, $class, $format = null, array $context = [])
3333
throw new InvalidArgumentException('Update is not allowed for this operation.');
3434
}
3535

36-
$context['object_to_populate'] = $this->iriConverter->getItemFromIri($data['id'], ['fetch_data' => false] + $context);
36+
$context['object_to_populate'] = $this->iriConverter->getItemFromIri($data['id'], $context + ['fetch_data' => false]);
3737
}
3838

3939
return parent::denormalize($data, $class, $format, $context);

0 commit comments

Comments
 (0)