Skip to content

Commit 4ca4545

Browse files
committed
feat(serializer): set the object-to-populate in deserializer context as soon as data !== null
1 parent aa20430 commit 4ca4545

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/State/Provider/DeserializeProvider.php

+1-10
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,7 @@ public function provide(Operation $operation, array $uriVariables = [], array $c
7575
throw new UnsupportedMediaTypeHttpException('Format not supported.');
7676
}
7777

78-
$method = $operation->getMethod();
79-
80-
if (
81-
null !== $data
82-
&& (
83-
'POST' === $method
84-
|| 'PATCH' === $method
85-
|| ('PUT' === $method && !($operation->getExtraProperties()['standard_put'] ?? true))
86-
)
87-
) {
78+
if (null !== $data) {
8879
$serializerContext[AbstractNormalizer::OBJECT_TO_POPULATE] = $data;
8980
}
9081

0 commit comments

Comments
 (0)