File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1176,15 +1176,15 @@ to ``true``::
11761176
11771177.. _component-serializer-handling-circular-references :
11781178
1179- Collecting type errors while denormalizing
1179+ Collecting Type Errors While Denormalizing
11801180------------------------------------------
11811181
1182- When denormalizing a payload to an object with type hints, if the payload
1183- contains a property that doesn 't have the same type as the object, an exception
1184- is thrown .
1182+ When denormalizing a payload to an object with typed properties, you'll get an
1183+ exception if the payload contains properties that don 't have the same type as
1184+ the object .
11851185
1186- It's possible to collect all exceptions at once, and to get the object partially
1187- denormalized::
1186+ In those situations, use the `` COLLECT_DENORMALIZATION_ERRORS `` option to
1187+ collect all exceptions at once, and to get the object partially denormalized::
11881188
11891189 try {
11901190 $dto = $serializer->deserialize($request->getContent(), MyDto::class, 'json', [
@@ -1205,6 +1205,10 @@ denormalized::
12051205 return $this->json($violations, 400);
12061206 }
12071207
1208+ .. versionadded :: 5.4
1209+
1210+ The ``COLLECT_DENORMALIZATION_ERRORS `` option was introduced in Symfony 5.4.
1211+
12081212Handling Circular References
12091213----------------------------
12101214
You can’t perform that action at this time.
0 commit comments