Skip to content

Commit 6b85e58

Browse files
committed
Fix initialization of the context
1 parent da84be3 commit 6b85e58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/EventListener/ReadListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ public function onKernelRequest(GetResponseEvent $event)
7070
$context = null === $filters ? [] : ['filters' => $filters];
7171
if ($this->serializerContextBuilder) {
7272
// Builtin data providers are able to use the serialization context to automatically add join clauses
73-
$context['normalization_context'] = $this->serializerContextBuilder->createFromRequest($request, true, $attributes);
74-
$request->attributes->set('_api_normalization_context', $context['normalization_context']);
73+
$context += $normalizationContext = $this->serializerContextBuilder->createFromRequest($request, true, $attributes);
74+
$request->attributes->set('_api_normalization_context', $normalizationContext);
7575
}
7676

7777
$data = [];

0 commit comments

Comments
 (0)