Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit98cc901

Browse files
authored
Update custom_normalizer.rst
From Symfony 6.1 if uses ObjectNormalizer on constructor throw the error: App\Serializer\Normalizer\DescriptionNormalizer::__construct(): Argumentsymfony#1 ($normalizer) must be of type Symfony\Component\Serializer\Normalizer\ObjectNormalizer, Symfony\Component\Serializer\Debug\TraceableNormalizer given
1 parent9ce082c commit98cc901

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎serializer/custom_normalizer.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``:
2323
use App\Entity\Topic;
2424
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
2525
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
26-
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
2726

2827
class TopicNormalizer implements NormalizerInterface
2928
{
3029
private $router;
3130
private $normalizer;
3231

33-
public function __construct(UrlGeneratorInterface $router,ObjectNormalizer $normalizer)
32+
public function __construct(UrlGeneratorInterface $router,NormalizerInterface $normalizer)
3433
{
3534
$this->router = $router;
3635
$this->normalizer = $normalizer;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp