Skip to content

Commit acaba63

Browse files
committed
[Serializer] Correction of examples using the attributes groups
1 parent fbc0139 commit acaba63

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)