🌐 AI搜索 & 代理 主页
Skip to content

Commit 52bd4c6

Browse files
feature #61413 [Serializer] Make AttributeMetadata and ClassMetadata final (nicolas-grekas)
This PR was merged into the 7.4 branch. Discussion ---------- [Serializer] Make `AttributeMetadata` and `ClassMetadata` final | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | yes | Deprecations? | yes | Issues | - | License | MIT One more PR to get rid of sleep/wakeup in 8.0 Commits ------- 727aaac [Serializer] Make `AttributeMetadata` and `ClassMetadata` final
2 parents b130cee + 727aaac commit 52bd4c6

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

UPGRADE-7.4.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ Security
5959
* Deprecate `AbstractListener::__invoke`
6060
* Deprecate `LazyFirewallContext::__invoke()`
6161

62+
Serializer
63+
----------
64+
65+
* Make `AttributeMetadata` and `ClassMetadata` final
66+
6267
Translation
6368
-----------
6469

src/Symfony/Component/Serializer/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CHANGELOG
66

77
* Add `CDATA_WRAPPING_NAME_PATTERN` support to `XmlEncoder`
88
* Add support for `can*()` methods to `AttributeLoader`
9+
* Make `AttributeMetadata` and `ClassMetadata` final
910

1011
7.3
1112
---

src/Symfony/Component/Serializer/Mapping/AttributeMetadata.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
/**
1717
* @author Kévin Dunglas <dunglas@gmail.com>
18+
*
19+
* @final since Symfony 7.4
1820
*/
1921
class AttributeMetadata implements AttributeMetadataInterface
2022
{
@@ -215,9 +217,9 @@ public function merge(AttributeMetadataInterface $attributeMetadata): void
215217
}
216218

217219
/**
218-
* Returns the names of the properties that should be serialized.
220+
* @internal since Symfony 7.4, will be replaced by `__serialize()` in 8.0
219221
*
220-
* @return string[]
222+
* @final since Symfony 7.4
221223
*/
222224
public function __sleep(): array
223225
{

src/Symfony/Component/Serializer/Mapping/ClassMetadata.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
/**
1515
* @author Kévin Dunglas <dunglas@gmail.com>
16+
*
17+
* @final since Symfony 7.4
1618
*/
1719
class ClassMetadata implements ClassMetadataInterface
1820
{
@@ -92,9 +94,9 @@ public function setClassDiscriminatorMapping(?ClassDiscriminatorMapping $mapping
9294
}
9395

9496
/**
95-
* Returns the names of the properties that should be serialized.
97+
* @internal since Symfony 7.4, will be replaced by `__serialize()` in 8.0
9698
*
97-
* @return string[]
99+
* @final since Symfony 7.4
98100
*/
99101
public function __sleep(): array
100102
{

0 commit comments

Comments
 (0)