Skip to content

Commit 357e518

Browse files
committed
fix(state): object mapper flag
1 parent c28c624 commit 357e518

31 files changed

+337
-72
lines changed

src/Metadata/ApiResource.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,8 +969,9 @@ public function __construct(
969969
array|Parameters|null $parameters = null,
970970
protected ?bool $strictQueryParameterValidation = null,
971971
protected ?bool $hideHydraOperation = null,
972-
?bool $jsonStream = null,
972+
protected ?bool $jsonStream = null,
973973
protected array $extraProperties = [],
974+
?bool $map = null,
974975
) {
975976
parent::__construct(
976977
shortName: $shortName,
@@ -1016,7 +1017,8 @@ class: $class,
10161017
strictQueryParameterValidation: $strictQueryParameterValidation,
10171018
hideHydraOperation: $hideHydraOperation,
10181019
jsonStream: $jsonStream,
1019-
extraProperties: $extraProperties
1020+
extraProperties: $extraProperties,
1021+
map: $map
10201022
);
10211023

10221024
/* @var Operations<HttpOperation> $operations> */

src/Metadata/Delete.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public function __construct(
101101
protected ?bool $hideHydraOperation = null,
102102
?bool $jsonStream = null,
103103
array $extraProperties = [],
104+
?bool $map = null,
104105
) {
105106
parent::__construct(
106107
method: 'DELETE',
@@ -183,6 +184,7 @@ class: $class,
183184
strictQueryParameterValidation: $strictQueryParameterValidation,
184185
hideHydraOperation: $hideHydraOperation,
185186
stateOptions: $stateOptions,
187+
map: $map
186188
);
187189
}
188190
}

src/Metadata/Error.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public function __construct(
9595
?OptionsInterface $stateOptions = null,
9696
?bool $hideHydraOperation = null,
9797
?bool $jsonStream = null,
98+
?bool $map = null,
9899
array $extraProperties = [],
99100
) {
100101
parent::__construct(
@@ -171,6 +172,7 @@ class: $class,
171172
stateOptions: $stateOptions,
172173
hideHydraOperation: $hideHydraOperation,
173174
jsonStream: $jsonStream,
175+
map: $map,
174176
extraProperties: $extraProperties,
175177
);
176178
}

src/Metadata/Extractor/XmlResourceExtractor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ private function buildBase(\SimpleXMLElement $resource): array
147147
'read' => $this->phpize($resource, 'read', 'bool'),
148148
'write' => $this->phpize($resource, 'write', 'bool'),
149149
'jsonStream' => $this->phpize($resource, 'jsonStream', 'bool'),
150+
'map' => $this->phpize($resource, 'map', 'bool'),
150151
];
151152
}
152153

src/Metadata/Extractor/YamlResourceExtractor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ private function buildBase(array $resource): array
173173
'read' => $this->phpize($resource, 'read', 'bool'),
174174
'write' => $this->phpize($resource, 'write', 'bool'),
175175
'jsonStream' => $this->phpize($resource, 'jsonStream', 'bool'),
176+
'map' => $this->phpize($resource, 'map', 'bool'),
176177
];
177178
}
178179

src/Metadata/Extractor/schema/resources.xsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@
524524
<xsd:attribute type="xsd:string" name="securityPostValidationMessage"/>
525525
<xsd:attribute type="xsd:boolean" name="collectDenormalizationErrors"/>
526526
<xsd:attribute type="xsd:boolean" name="jsonStream"/>
527+
<xsd:attribute type="xsd:boolean" name="map"/>
527528
</xsd:attributeGroup>
528529

529530
<xsd:attributeGroup name="extendedBase">

src/Metadata/Get.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public function __construct(
101101
protected ?bool $hideHydraOperation = null,
102102
?bool $jsonStream = null,
103103
array $extraProperties = [],
104+
?bool $map = null,
104105
) {
105106
parent::__construct(
106107
uriTemplate: $uriTemplate,
@@ -182,6 +183,7 @@ class: $class,
182183
hideHydraOperation: $hideHydraOperation,
183184
jsonStream: $jsonStream,
184185
extraProperties: $extraProperties,
186+
map: $map
185187
);
186188
}
187189
}

src/Metadata/GetCollection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public function __construct(
102102
?bool $jsonStream = null,
103103
array $extraProperties = [],
104104
private ?string $itemUriTemplate = null,
105+
?bool $map = null,
105106
) {
106107
parent::__construct(
107108
uriTemplate: $uriTemplate,
@@ -183,6 +184,7 @@ class: $class,
183184
strictQueryParameterValidation: $strictQueryParameterValidation,
184185
hideHydraOperation: $hideHydraOperation,
185186
stateOptions: $stateOptions,
187+
map: $map
186188
);
187189
}
188190

src/Metadata/GraphQl/Operation.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public function __construct(
9292
mixed $rules = null,
9393
?string $policy = null,
9494
array $extraProperties = [],
95+
?bool $map = null,
9596
) {
9697
parent::__construct(
9798
shortName: $shortName,
@@ -141,7 +142,8 @@ class: $class,
141142
queryParameterValidationEnabled: $queryParameterValidationEnabled,
142143
rules: $rules,
143144
policy: $policy,
144-
extraProperties: $extraProperties
145+
extraProperties: $extraProperties,
146+
map: $map
145147
);
146148
}
147149

src/Metadata/GraphQl/Query.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public function __construct(
7777
array $extraProperties = [],
7878

7979
protected ?bool $nested = null,
80+
?bool $map = null,
8081
) {
8182
parent::__construct(
8283
resolver: $resolver,
@@ -132,7 +133,8 @@ class: $class,
132133
queryParameterValidationEnabled: $queryParameterValidationEnabled,
133134
policy: $policy,
134135
rules: $rules,
135-
extraProperties: $extraProperties
136+
extraProperties: $extraProperties,
137+
map: $map
136138
);
137139
}
138140

0 commit comments

Comments
 (0)