Skip to content

Commit

Permalink
minor #16683 [Serializer] Update serializer.rst (issamkhadiri1989)
Browse files Browse the repository at this point in the history
This PR was submitted for the 6.0 branch but it was merged into the 6.4 branch instead.

Discussion
----------

[Serializer] Update serializer.rst

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

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/releases for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `6.x` for features of unreleased versions).

-->

Commits
-------

2d93c37 Update serializer.rst
  • Loading branch information
javiereguiluz committed Jun 21, 2024
2 parents 5cea89e + 2d93c37 commit d47ea71
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 d47ea71

Please sign in to comment.