File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed
src/Symfony/Component/Serializer Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ private function getAttributesData(ClassMetadataInterface $classMetadata): array
102
102
'groups ' => $ attributeMetadata ->getGroups (),
103
103
'maxDepth ' => $ attributeMetadata ->getMaxDepth (),
104
104
'serializedName ' => $ attributeMetadata ->getSerializedName (),
105
+ 'serializedPath ' => $ attributeMetadata ->getSerializedPath () ? (string ) $ attributeMetadata ->getSerializedPath () : null ,
105
106
'ignore ' => $ attributeMetadata ->isIgnored (),
106
107
'normalizationContexts ' => $ attributeMetadata ->getNormalizationContexts (),
107
108
'denormalizationContexts ' => $ attributeMetadata ->getDenormalizationContexts (),
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ public function testOutputWithClassArgument()
46
46
| | ], |
47
47
| | "maxDepth" => 1, |
48
48
| | "serializedName" => "identifier", |
49
+ | | "serializedPath" => null, |
49
50
| | "ignore" => true, |
50
51
| | "normalizationContexts" => [ |
51
52
| | "*" => [ |
@@ -66,6 +67,7 @@ public function testOutputWithClassArgument()
66
67
| | "groups" => [], |
67
68
| | "maxDepth" => null, |
68
69
| | "serializedName" => null, |
70
+ | | "serializedPath" => [data][name], |
69
71
| | "ignore" => false, |
70
72
| | "normalizationContexts" => [], |
71
73
| | "denormalizationContexts" => [] |
Original file line number Diff line number Diff line change 16
16
use Symfony \Component \Serializer \Attribute \Ignore ;
17
17
use Symfony \Component \Serializer \Attribute \MaxDepth ;
18
18
use Symfony \Component \Serializer \Attribute \SerializedName ;
19
+ use Symfony \Component \Serializer \Attribute \SerializedPath ;
19
20
20
21
class DummyClassOne
21
22
{
@@ -29,5 +30,6 @@ class DummyClassOne
29
30
)]
30
31
public string $ code ;
31
32
33
+ #[SerializedPath('[data][name] ' )]
32
34
public string $ name ;
33
35
}
You can’t perform that action at this time.
0 commit comments