Skip to content

Commit

Permalink
Update serializer.rst
Browse files Browse the repository at this point in the history
Hello

I think it is not necessary to add a ClassMetadataFactory here because we are not about to use Class Metadata, Without that argument, the example works well too
  • Loading branch information
issamkhadiri1989 authored and javiereguiluz committed Jun 21, 2024
1 parent 5cea89e commit 2d93c37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ context option::
}
}

$normalizer = new ObjectNormalizer($classMetadataFactory);
$normalizer = new ObjectNormalizer();
$serializer = new Serializer([$normalizer]);

$data = $serializer->denormalize(
Expand Down

0 comments on commit 2d93c37

Please sign in to comment.