Skip to content

Commit 17fbfe2

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

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/State/Provider/DeserializeProvider.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,8 @@ public function provide(Operation $operation, array $uriVariables = [], array $c
7777

7878
$method = $operation->getMethod();
7979

80-
if (
81-
null !== $data
82-
&& (
83-
'POST' === $method
84-
|| 'PATCH' === $method
85-
|| ('PUT' === $method && !($operation->getExtraProperties()['standard_put'] ?? true))
86-
)
80+
if (null !== $data
81+
&& ('PUT' !== $method || !($operation->getExtraProperties()['standard_put'] ?? true))
8782
) {
8883
$serializerContext[AbstractNormalizer::OBJECT_TO_POPULATE] = $data;
8984
}

0 commit comments

Comments
 (0)