Skip to content

Commit 1f4a1bc

Browse files
committed
feature #49950 [Serializer] Marking some Normalizer classes as final (tucksaun)
This PR was merged into the 6.3 branch. Discussion ---------- [Serializer] Marking some Normalizer classes as final | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | yes | Tickets | #49291 (review) | License | MIT | Doc PR | n/a As mentioned in #49291 (review). Making those classes final will allow to get rid of all the `__CLASS__ === static::class` for cacheability checks in 7.0 Commits ------- d976fc5 [Serializer] Marking some Normalizer classes as final
2 parents db49c88 + d976fc5 commit 1f4a1bc

11 files changed

+40
-2
lines changed

UPGRADE-6.3.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,14 @@ Serializer
117117

118118
* Deprecate `MissingConstructorArgumentsException` in favor of `MissingConstructorArgumentException`
119119
* Deprecate `CacheableSupportsMethodInterface` in favor of the new `getSupportedTypes(?string $format)` methods
120-
* The following Normalizer classes will become final in 7.0: `ObjectNormalizer`
120+
* The following Normalizer classes will become final in 7.0:
121+
* `ConstraintViolationListNormalizer`
122+
* `CustomNormalizer`
123+
* `DataUriNormalizer`
124+
* `DateIntervalNormalizer`
125+
* `DateTimeNormalizer`
126+
* `DateTimeZoneNormalizer`
127+
* `GetSetMethodNormalizer`
128+
* `JsonSerializableNormalizer`
129+
* `ObjectNormalizer`
130+
* `PropertyNormalizer`

src/Symfony/Component/Serializer/CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ CHANGELOG
1010
* Make `ProblemNormalizer` give details about `ValidationFailedException` and `PartialDenormalizationException`
1111
* Deprecate `MissingConstructorArgumentsException` in favor of `MissingConstructorArgumentException`
1212
* Deprecate `CacheableSupportsMethodInterface` in favor of the new `getSupportedTypes(?string $format)` methods
13-
* The following Normalizer classes will become final in 7.0: `ObjectNormalizer`
13+
* The following Normalizer classes will become final in 7.0:
14+
* `ConstraintViolationListNormalizer`
15+
* `CustomNormalizer`
16+
* `DataUriNormalizer`
17+
* `DateIntervalNormalizer`
18+
* `DateTimeNormalizer`
19+
* `DateTimeZoneNormalizer`
20+
* `GetSetMethodNormalizer`
21+
* `JsonSerializableNormalizer`
22+
* `ObjectNormalizer`
23+
* `PropertyNormalizer`
1424

1525
6.2
1626
---

src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*
2222
* @author Grégoire Pineau <lyrixx@lyrixx.info>
2323
* @author Kévin Dunglas <dunglas@gmail.com>
24+
*
25+
* @final since Symfony 6.3
2426
*/
2527
class ConstraintViolationListNormalizer implements NormalizerInterface, CacheableSupportsMethodInterface
2628
{

src/Symfony/Component/Serializer/Normalizer/CustomNormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
/**
1818
* @author Jordi Boggiano <j.boggiano@seld.be>
19+
*
20+
* @final since Symfony 6.3
1921
*/
2022
class CustomNormalizer implements NormalizerInterface, DenormalizerInterface, SerializerAwareInterface, CacheableSupportsMethodInterface
2123
{

src/Symfony/Component/Serializer/Normalizer/DataUriNormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
* Denormalizes a data URI to a {@see \SplFileObject} object.
2323
*
2424
* @author Kévin Dunglas <dunglas@gmail.com>
25+
*
26+
* @final since Symfony 6.3
2527
*/
2628
class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface
2729
{

src/Symfony/Component/Serializer/Normalizer/DateIntervalNormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* Denormalizes an interval string to an instance of {@see \DateInterval}.
2020
*
2121
* @author Jérôme Parmentier <jerome@prmntr.me>
22+
*
23+
* @final since Symfony 6.3
2224
*/
2325
class DateIntervalNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface
2426
{

src/Symfony/Component/Serializer/Normalizer/DateTimeNormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* Denormalizes a date string to an instance of {@see \DateTime} or {@see \DateTimeImmutable}.
2121
*
2222
* @author Kévin Dunglas <dunglas@gmail.com>
23+
*
24+
* @final since Symfony 6.3
2325
*/
2426
class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface
2527
{

src/Symfony/Component/Serializer/Normalizer/DateTimeZoneNormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* Normalizes a {@see \DateTimeZone} object to a timezone string.
2020
*
2121
* @author Jérôme Desjardins <jewome62@gmail.com>
22+
*
23+
* @final since Symfony 6.3
2224
*/
2325
class DateTimeZoneNormalizer implements NormalizerInterface, DenormalizerInterface, CacheableSupportsMethodInterface
2426
{

src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
*
3434
* @author Nils Adermann <naderman@naderman.de>
3535
* @author Kévin Dunglas <dunglas@gmail.com>
36+
*
37+
* @final since Symfony 6.3
3638
*/
3739
class GetSetMethodNormalizer extends AbstractObjectNormalizer
3840
{

src/Symfony/Component/Serializer/Normalizer/JsonSerializableNormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
* A normalizer that uses an objects own JsonSerializable implementation.
1919
*
2020
* @author Fred Cox <mcfedr@gmail.com>
21+
*
22+
* @final since Symfony 6.3
2123
*/
2224
class JsonSerializableNormalizer extends AbstractNormalizer
2325
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy