Skip to content

Commit ce1981e

Browse files
committed
minor #20155 [Serializer] Correction of examples using the attributes groups (lkolndeep)
This PR was merged into the 5.4 branch. Discussion ---------- [Serializer] Correction of examples using the attributes groups A correction of two examples of denormalization operations using the attribute groups. Commits ------- acaba63 [Serializer] Correction of examples using the attributes groups
2 parents fbc0139 + acaba63 commit ce1981e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/serializer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ You are now able to serialize only attributes in the groups you want::
404404

405405
$obj2 = $serializer->denormalize(
406406
['foo' => 'foo', 'anotherProperty' => 'anotherProperty', 'bar' => 'bar'],
407-
'MyObj',
407+
MyObj::class,
408408
null,
409409
['groups' => ['group1', 'group3']]
410410
);
@@ -413,7 +413,7 @@ You are now able to serialize only attributes in the groups you want::
413413
// To get all groups, use the special value `*` in `groups`
414414
$obj3 = $serializer->denormalize(
415415
['foo' => 'foo', 'anotherProperty' => 'anotherProperty', 'bar' => 'bar'],
416-
'MyObj',
416+
MyObj::class,
417417
null,
418418
['groups' => ['*']]
419419
);

0 commit comments

Comments
 (0)