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 32600a3

Browse filesBrowse 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
Copy full SHA for 32600a3

File tree

3 files changed

+17
-0
lines changed
Filter options

3 files changed

+17
-0
lines changed

‎UPGRADE-6.2.md

Copy file name to clipboardExpand all lines: UPGRADE-6.2.md
+7Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
+7Lines 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+
`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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php
+3Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.