8000 bug #51509 [HttpKernel] Fix the order of merging of serializationCont… · symfony/symfony@1981bc9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1981bc9

Browse files
bug #51509 [HttpKernel] Fix the order of merging of serializationContext and self::CONTEXT_DENORMALIZE (pedrocasado)
This PR was merged into the 6.3 branch. Discussion ---------- [HttpKernel] Fix the order of merging of serializationContext and self::CONTEXT_DENORMALIZE | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #51235 | License | MIT Commits ------- 6fcf355 fix #51235 - fix the order of merging of serializationContext and self::CONTEXT_DENORMALIZE
2 parents 94b74d3 + 6fcf355 commit 1981bc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/HttpKernel/Controller/ArgumentResolver/RequestPayloadValueResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private function mapQueryString(Request $request, string $type, MapQueryString $
161161
return null;
162162
}
163163

164-
return $this->serializer->denormalize($data, $type, null, self::CONTEXT_DENORMALIZE + $attribute->serializationContext);
164+
return $this->serializer->denormalize($data, $type, null, $attribute->serializationContext + self::CONTEXT_DENORMALIZE);
165165
}
166166

167167
private function mapRequestPayload(Request $request, string $type, MapRequestPayload $attribute): ?object
@@ -175,7 +175,7 @@ private function mapRequestPayload(Request $request, string $type, MapRequestPay
175175
}
176176

177177
if ($data = $request->request->all()) {
178-
return $this->serializer->denormalize($data, $type, null, self::CONTEXT_DENORMALIZE + $attribute->serializationContext);
178+
return $this->serializer->denormalize($data, $type, null, $attribute->serializationContext + self::CONTEXT_DENORMALIZE);
179179
}
180180

181181
if ('' === $data = $request->getContent()) {

0 commit comments

Comments
 (0)
0