Skip to content

Commit dfd0c43

Browse files
committed
minor #20922 [Serializer] Update custom_normalizer.rst (jordanaubert)
This PR was merged into the 7.2 branch. Discussion ---------- [Serializer] Update custom_normalizer.rst Update `normalize` signature according to `NormalizerInterface` <!-- 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 `7.x` for features of unreleased versions). --> Commits ------- 49a3f18 Update custom_normalizer.rst
2 parents 2e6f336 + 49a3f18 commit dfd0c43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

serializer/custom_normalizer.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ normalization process::
3636
) {
3737
}
3838

39-
public function normalize(mixed $object, ?string $format = null, array $context = []): array
39+
public function normalize(mixed $data, ?string $format = null, array $context = []): array
4040
{
41-
$data = $this->normalizer->normalize($object, $format, $context);
41+
$data = $this->normalizer->normalize($data, $format, $context);
4242

4343
// Here, add, edit, or delete some data:
4444
$data['href']['self'] = $this->router->generate('topic_show', [

0 commit comments

Comments
 (0)