8000 feature #46663 [Serializer] Deprecate autowiring aliases pointing to … · symfony/symfony@32600a3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 32600a3

Browse files
committed
feature #46663 [Serializer] Deprecate autowiring aliases pointing to concrete normalizers (chalasr)
This PR was merged into the 6.2 branch. Discussion ---------- [Serializer] Deprecate autowiring aliases pointing to concrete normalizers | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | - | License | MIT | Doc PR | - They should've never been added. See #22098 (comment) Commits ------- c1680be [Serializer] Deprecate autowiring aliases pointing to concrete normalizers
2 parents 7d4b42c + c1680be commit 32600a3

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

UPGRADE-6.2.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
UPGRADE FROM 6.1 to 6.2
22
=======================
33

4+
FrameworkBundle
5+
---------------
6+
7+
* Deprecate the `Symfony\Component\Serializer\Normalizer\ObjectNormalizer` and
8+
`Symfony\Component\Serializer\Normalizer\PropertyNormalizer` autowiring aliases, type-hint against
9+
`Symfony\Component\Serializer\Normalizer\NormalizerInterface` or implement `NormalizerAwareInterface` instead
10+
411
Security
512
--------
613

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
CHANGELOG
22
=========
33

4+
6.2
5+
---
6+
7+
* Deprecate the `Symfony\Component\Serializer\Normalizer\ObjectNormalizer` and
8+
< FD71 span class="pl-s">`Symfony\Component\Serializer\Normalizer\PropertyNormalizer` autowiring aliases, type-hint against
9+
`Symfony\Component\Serializer\Normalizer\NormalizerInterface` or implement `NormalizerAwareInterface` instead
10+
411
6.1
512
---
613

src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
use Symfony\Component\Serializer\Normalizer\FormErrorNormalizer;
4343
use Symfony\Component\Serializer\Normalizer\JsonSerializableNormalizer;
4444
use Symfony\Component\Serializer\Normalizer\MimeMessageNormalizer;
45+
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
4546
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
4647
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
4748
use Symfony\Component\Serializer\Normalizer\ProblemNormalizer;
@@ -127,6 +128,7 @@
127128
->tag('serializer.normalizer', ['priority' => -1000])
128129

129130
->alias(ObjectNormalizer::class, 'serializer.normalizer.object')
131+
->deprecate('symfony/serializer', '6.2', 'The "%alias_id%" service alias is deprecated, type-hint against "'.NormalizerInterface::class.'" or implement "'.NormalizerAwareInterface::class.'" instead.')
130132

131133
->set('serializer.normalizer.property', PropertyNormalizer::class)
132134
->args([
@@ -139,6 +141,7 @@
139141
])
140142

141143
->alias(PropertyNormalizer::class, 'serializer.normalizer.property')
144+
->deprecate('symfony/serializer', '6.2', 'The "%alias_id%" service alias is deprecated, type-hint against "'.NormalizerInterface::class.'" or implement "'.NormalizerAwareInterface::class.'" instead.')
142145

143146
->set('serializer.denormalizer.array', ArrayDenormalizer::class)
144147
->tag('serializer.normalizer', ['priority' => -990])

0 commit comments

Comments
 (0)
0