Skip to content

Commit 626f7f5

Browse files
committed
Merge 3.4
2 parents f9d96e5 + 6dfa89b commit 626f7f5

File tree

5 files changed

+35
-9
lines changed

5 files changed

+35
-9
lines changed

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,21 @@ Notes:
112112

113113
* [0d5f35683](https://github.com/api-platform/core/commit/0d5f356839eb6aa9f536044abe4affa736553e76) feat(laravel): laravel component (#5882)
114114

115+
## v3.4.2
116+
117+
### Bug fixes
118+
119+
* [0ca76fc89](https://github.com/api-platform/core/commit/0ca76fc898d2d1a679a490a5dea85473bf680901) fix(elasticsearch): allow elasticsearch 7 (#6689)
120+
* [15d61c4b7](https://github.com/api-platform/core/commit/15d61c4b75fea2b365e0852a923fed8efbae6ab8) fix(metadata): using parameters in fromClass and toClass uriVariables' options (#6663)
121+
* [2e2044636](https://github.com/api-platform/core/commit/2e204463675939903128037f82916d68f0016719) fix(metadata): parameter provider in a long running http worker (#6683)
122+
* [4c58b33e8](https://github.com/api-platform/core/commit/4c58b33e8c5a90f9377543bd068288dcf84e3236) fix(jsonapi): fixed definition name to allow using the same class names in different namespaces (#6676)
123+
* [4f5f56756](https://github.com/api-platform/core/commit/4f5f5675629fe52ea415a6bd91f3625eedea9c87) fix: remove hydra prefix on errors (#6624)
124+
* [afe7d47d7](https://github.com/api-platform/core/commit/afe7d47d7b7ba6c8591bfb60137a65d1fa1fe38f) fix(metadata): passing class as parameter in XML ApiResource's definition (#6659)
125+
* [b93ee467c](https://github.com/api-platform/core/commit/b93ee467c69253e0cfe60e75b48a5c7aa683474a) fix(metadata): overwriting XML ApiResource definition by YAML ApiResource definition (#6660)
126+
127+
> [!WARNING]
128+
> Hydra prefix on errors is breaking, read `title` not `hydra:title`. The `hydra_prefix` flag doesn't apply to errors as it provided redundant information (both `hydra:title` and `title` were available)
129+
115130
## v3.4.1
116131

117132
### Bug fixes
@@ -271,6 +286,20 @@ You should now install `api-platform/symfony` instead of `api-platform/core`.
271286
* [74986cb55](https://github.com/api-platform/core/commit/74986cb552182dc645bd1fc967faa0954dd59e0a) feat: inflector as service (#6447)
272287
* [b47edb2a4](https://github.com/api-platform/core/commit/b47edb2a499c34e79c167f963e3a626a3e9d040a) feat(serializer): context IRI in HAL or JsonApi format (#6215)
273288

289+
## v3.3.14
290+
291+
### Bug fixes
292+
293+
* [4c58b33e8](https://github.com/api-platform/core/commit/4c58b33e8c5a90f9377543bd068288dcf84e3236) fix(jsonapi): fixed definition name to allow using the same class names in different namespaces (#6676)
294+
295+
## v3.3.13
296+
297+
### Bug fixes
298+
299+
* [1b9dfccc8](https://github.com/api-platform/core/commit/1b9dfccc8d64be2b04e48490905771a77aefdd96) fix: count TraversablePaginator (#6611)
300+
* [4c58b33e8](https://github.com/api-platform/core/commit/4c58b33e8c5a90f9377543bd068288dcf84e3236) fix(jsonapi): fixed definition name to allow using the same class names in different namespaces (#6676)
301+
* [ef0ee6427](https://github.com/api-platform/core/commit/ef0ee6427f8056bcb2617c228a7cf9ffd9d29ccd) fix(doctrine): use parameter.property for filter value (#6572)
302+
274303
## v3.3.12
275304

276305
### Bug fixes

src/Metadata/Extractor/XmlResourceExtractor.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ protected function extractPath(string $path): void
6161
foreach ($xml->resource as $resource) {
6262
$base = $this->buildExtendedBase($resource);
6363
$this->resources[$this->resolve((string) $resource['class'])][] = array_merge($base, [
64-
'class' => $this->phpize($resource, 'class', 'string'),
6564
'operations' => $this->buildOperations($resource, $base),
6665
'graphQlOperations' => $this->buildGraphQlOperations($resource, $base),
6766
]);
@@ -270,10 +269,10 @@ private function buildUriVariables(\SimpleXMLElement $resource): ?array
270269
if ($toProperty = $this->phpize($data, 'toProperty', 'string')) {
271270
$uriVariables[$parameterName]['to_property'] = $toProperty;
272271
}
273-
if ($fromClass = $this->phpize($data, 'fromClass', 'string')) {
272+
if ($fromClass = $this->resolve($this->phpize($data, 'fromClass', 'string'))) {
274273
$uriVariables[$parameterName]['from_class'] = $fromClass;
275274
}
276-
if ($toClass = $this->phpize($data, 'toClass', 'string')) {
275+
if ($toClass = $this->resolve($this->phpize($data, 'toClass', 'string'))) {
277276
$uriVariables[$parameterName]['to_class'] = $toClass;
278277
}
279278
if (isset($data->identifiers->values)) {

src/Metadata/Extractor/YamlResourceExtractor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ private function buildUriVariables(array $resource): ?array
192192
unset($data[0], $data[1]);
193193
}
194194
if (isset($data['fromClass'])) {
195-
$uriVariables[$parameterName]['from_class'] = $data['fromClass'];
195+
$uriVariables[$parameterName]['from_class'] = $this->resolve($data['fromClass']);
196196
}
197197
if (isset($data['fromProperty'])) {
198198
$uriVariables[$parameterName]['from_property'] = $data['fromProperty'];
199199
}
200200
if (isset($data['toClass'])) {
201-
$uriVariables[$parameterName]['to_class'] = $data['toClass'];
201+
$uriVariables[$parameterName]['to_class'] = $this->resolve($data['toClass']);
202202
}
203203
if (isset($data['toProperty'])) {
204204
$uriVariables[$parameterName]['to_property'] = $data['toProperty'];

src/Metadata/Resource/Factory/ExtractorResourceMetadataCollectionFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ public function create(string $resourceClass): ResourceMetadataCollection
5353
return $resourceMetadataCollection;
5454
}
5555

56-
foreach ($this->buildResources($resources, $resourceClass) as $i => $resource) {
56+
foreach ($this->buildResources($resources, $resourceClass) as $resource) {
5757
foreach ($this->defaults['attributes'] ?? [] as $key => $value) {
5858
if (method_exists($resource, 'get'.ucfirst($key)) && !$resource->{'get'.ucfirst($key)}()) {
5959
$resource = $resource->{'with'.ucfirst($key)}($value);
6060
}
6161
}
6262

63-
$resourceMetadataCollection[$i] = $resource;
63+
$resourceMetadataCollection[] = $resource;
6464
}
6565

6666
return $resourceMetadataCollection;

src/Metadata/Tests/Extractor/XmlExtractorTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public function testValidXML(): void
9494
'extraProperties' => null,
9595
'operations' => null,
9696
'graphQlOperations' => null,
97-
'class' => Comment::class,
9897
'processor' => null,
9998
'provider' => null,
10099
'read' => null,
@@ -390,7 +389,6 @@ public function testValidXML(): void
390389
],
391390
],
392391
'graphQlOperations' => null,
393-
'class' => Comment::class,
394392
'processor' => null,
395393
'provider' => null,
396394
'read' => null,

0 commit comments

Comments
 (0)