Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e074cb

Browse filesBrowse files
committed
minor #20808 [Serializer] Update args (andreybolonin)
This PR was merged into the 6.4 branch. Discussion ---------- [Serializer] Update args <!-- 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 ------- b95b104 Update custom_normalizer.rst
2 parents 5475b2d + b95b104 commit 2e074cb
Copy full SHA for 2e074cb

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎serializer/custom_normalizer.rst

Copy file name to clipboardExpand all lines: serializer/custom_normalizer.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``:
3333
) {
3434
}
3535

36-
public function normalize($topic, ?string $format = null, array $context = []): array
36+
public function normalize(mixed $object, ?string $format = null, array $context = []): array
3737
{
38-
$data = $this->normalizer->normalize($topic, $format, $context);
38+
$data = $this->normalizer->normalize($object, $format, $context);
3939

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.