Skip to content

Commit 4fb1a4f

Browse files
committed
[Serializer] Named serializer normalizers are no longer added to defualt
1 parent 7cc8d25 commit 4fb1a4f

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

serializer.rst

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,8 +1717,6 @@ or :ref:`serializer.encoder <reference-dic-tags-serializer-encoder>` tags:
17171717
# ...
17181718
17191719
Symfony\Component\Serializer\Normalizer\CustomNormalizer:
1720-
# prevent this normalizer from being automatically added to the default serializer
1721-
autoconfigure: false
17221720
tags:
17231721
# add this normalizer only to a specific named serializer
17241722
- serializer.normalizer: { serializer: 'api_client1' }
@@ -1739,11 +1737,7 @@ or :ref:`serializer.encoder <reference-dic-tags-serializer-encoder>` tags:
17391737
<services>
17401738
<!-- ... -->
17411739
1742-
<!-- prevent this normalizer from being automatically added to the default serializer -->
1743-
<service
1744-
id="Symfony\Component\Serializer\Normalizer\CustomNormalizer"
1745-
autoconfigure="false"
1746-
>
1740+
<service id="Symfony\Component\Serializer\Normalizer\CustomNormalizer">
17471741
<!-- add this normalizer only to a specific named serializer -->
17481742
<tag name="serializer.normalizer" serializer="api_client1"/>
17491743
@@ -1768,9 +1762,6 @@ or :ref:`serializer.encoder <reference-dic-tags-serializer-encoder>` tags:
17681762
// ...
17691763
17701764
$services->set(CustomNormalizer::class)
1771-
// prevent this normalizer from being automatically added to the default serializer
1772-
->autoconfigure(false)
1773-
17741765
// add this normalizer only to a specific named serializer
17751766
->tag('serializer.normalizer', ['serializer' => 'api_client1'])
17761767
// add this normalizer to several named serializers

0 commit comments

Comments
 (0)