Skip to content

Commit 88f5ac5

Browse files
committed
Merge 4.1
2 parents bf09616 + ba5cea7 commit 88f5ac5

File tree

71 files changed

+607
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+607
-142
lines changed

.github/workflows/api_platform.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Distribution update
33
on:
44
push:
55
tags:
6-
- v*
6+
workflow_dispatch: ~
77

88
env:
99
GH_TOKEN: ${{ github.token }}
@@ -17,6 +17,6 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Update distribution
20-
run: gh workflow run -R api-platform/api-platfom release.yml -f tag=${{ github.ref_name }}
20+
run: gh workflow run -R api-platform/api-platform release.yml -f tag=${{ github.ref_name }}
2121

2222

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## v4.1.1
4+
5+
### Bug fixes
6+
7+
* [1e0bc9dc8](https://github.com/api-platform/core/commit/1e0bc9dc8ebe2f947ac0b3bc153047b0b28b0a17) fix(laravel): query extensions with item operations (#7001)
8+
* [1e7076c65](https://github.com/api-platform/core/commit/1e7076c65aea9a2f09b0dcc6598ef2a705e0bb45) fix(laravel): register ErrorProvider (#7018)
9+
* [2771363b0](https://github.com/api-platform/core/commit/2771363b03f1b1c27313ecd457f7a4934524151c) fix(validation): deprecate string message for ValidationException constructor (#7005)
10+
* [500062da2](https://github.com/api-platform/core/commit/500062da2074585979e9a92939bc3b7a3c7554c5) fix(symfony): add a `alwaysBootKernel` property for BC layer (#7007)
11+
* [8697d6630](https://github.com/api-platform/core/commit/8697d66304d276feeef6f838c8c54291d3563aab) fix(openapi): boolean "true" value in HttpOperation::openapi (#7003)
12+
* [b1e0c889c](https://github.com/api-platform/core/commit/b1e0c889cc96602afc9c68fccb9da25a6b6fd354) fix(doctrine): correct the use statement for ManagerRegistry (#7004)
13+
* [fcbd804b2](https://github.com/api-platform/core/commit/fcbd804b29907baba8878ca12ff013732e0326e4) fix(jsonld): duplicate error fields when prefix is enabled (#7021)
14+
15+
### Features
16+
17+
* [129853668](https://github.com/api-platform/core/commit/129853668c3fd66bcfe1a298a0f662c29545f7a4) feat(laravel): stateOptions modelClass for eloquent (#7020)
18+
* [42991b941](https://github.com/api-platform/core/commit/42991b9418c340e44c9e30360e5dd4d869433859) feat(laravel): openapi export command (#7016)
19+
* [dd1b89f9b](https://github.com/api-platform/core/commit/dd1b89f9b771544cb8449d7e9f8f4bbd80c615d2) feat(laravel): auto configure our tagged interfaces (#7014)
20+
21+
Also contains [v4.0.20 changes](#v4020).
22+
323
## v4.1.0
424

525
### Bug fixes
@@ -100,6 +120,16 @@ On write operations, we added the [expectsHeader](https://www.hydra-cg.com/spec/
100120
* [d0a442786](https://github.com/api-platform/core/commit/d0a44278630d201b91cbba0774a09f4eeaac88f7) feat(doctrine): enhance getLinksHandler with method validation and typo suggestions (#6874)
101121
* [f67f6f1ac](https://github.com/api-platform/core/commit/f67f6f1acb6476182c18a3503f2a8bc80ae89a0b) feat(doctrine): doctrine filters like laravel eloquent filters (#6775)
102122

123+
## v4.0.20
124+
125+
### Bug fixes
126+
127+
* [284937039](https://github.com/api-platform/core/commit/284937039c61d4516687c648f4a7581ec1686f3d) fix(doctrine): mapping ArrayAccess deprecation (#6982)
128+
* [a434173b8](https://github.com/api-platform/core/commit/a434173b82f735041a79cb5f469ee0e731ca5956) fix(doctrine): Add a proper exception when a doctrine manager could not be found for a resource class (#6995)
129+
130+
131+
### Features
132+
103133
## v4.0.19
104134

105135
### Bug fixes

features/hydra/collection.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ Feature: Collections support
479479

480480
When I send a "GET" request to "/dummies?itemsPerPage=0&page=2"
481481
Then the response status code should be 400
482-
And the JSON node "description" should be equal to "Page should not be greater than 1 if limit is equal to 0"
482+
And the JSON node "detail" should be equal to "Page should not be greater than 1 if limit is equal to 0"
483483

484484
Scenario: Cursor-based pagination with an empty collection
485485
When I send a "GET" request to "/so_manies"

features/hydra/error.feature

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Feature: Error handling
1616
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
1717
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
1818
And the JSON node "type" should exist
19-
And the JSON node "title" should be equal to "An error occurred"
19+
And the JSON node "title" should not exists
2020
And the JSON node "hydra:title" should be equal to "An error occurred"
2121
And the JSON node "detail" should exist
22-
And the JSON node "description" should exist
22+
And the JSON node "description" should not exist
2323
And the JSON node "hydra:description" should exist
2424
And the JSON node "trace" should exist
2525
And the JSON node "status" should exist
@@ -49,10 +49,8 @@ Feature: Error handling
4949
}
5050
],
5151
"detail": "name: This value should not be blank.",
52-
"title": "An error occurred",
5352
"hydra:title": "An error occurred",
5453
"hydra:description": "name: This value should not be blank.",
55-
"description": "name: This value should not be blank.",
5654
"type": "/validation_errors/c1051bb4-d103-4f74-8988-acbcafc7fdc3"
5755
}
5856
"""
@@ -69,7 +67,7 @@ Feature: Error handling
6967
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
7068
And the JSON node "@context" should exist
7169
And the JSON node "type" should exist
72-
And the JSON node "title" should be equal to "An error occurred"
70+
And the JSON node "hydra:title" should be equal to "An error occurred"
7371
And the JSON node "detail" should exist
7472

7573
Scenario: Get an rfc 7807 not found error
@@ -84,9 +82,9 @@ Feature: Error handling
8482
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
8583
And the JSON node "@context" should exist
8684
And the JSON node "type" should exist
87-
And the JSON node "title" should be equal to "An error occurred"
85+
And the JSON node "hydra:title" should be equal to "An error occurred"
8886
And the JSON node "detail" should exist
89-
And the JSON node "description" should exist
87+
And the JSON node "description" should not exist
9088

9189
Scenario: Get an rfc 7807 bad method error
9290
When I add "Content-Type" header equal to "application/ld+json"
@@ -101,9 +99,9 @@ Feature: Error handling
10199
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
102100
And the JSON node "@context" should exist
103101
And the JSON node "type" should exist
104-
And the JSON node "title" should be equal to "An error occurred"
102+
And the JSON node "hydra:title" should be equal to "An error occurred"
105103
And the JSON node "detail" should exist
106-
And the JSON node "description" should exist
104+
And the JSON node "description" should not exist
107105

108106
Scenario: Get an rfc 7807 validation error
109107
When I add "Content-Type" header equal to "application/ld+json"
@@ -118,7 +116,7 @@ Feature: Error handling
118116
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
119117
And the JSON node "@context" should exist
120118
And the JSON node "type" should exist
121-
And the JSON node "title" should be equal to "An error occurred"
119+
And the JSON node "hydra:title" should be equal to "An error occurred"
122120
And the JSON node "detail" should exist
123121
And the JSON node "violations" should exist
124122

@@ -133,8 +131,8 @@ Feature: Error handling
133131
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
134132
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
135133
And the JSON node "type" should exist
136-
And the JSON node "title" should be equal to "An error occurred"
134+
And the JSON node "hydra:title" should be equal to "An error occurred"
137135
And the JSON node "detail" should exist
138-
And the JSON node "description" should exist
136+
And the JSON node "description" should not exist
139137
And the JSON node "trace" should exist
140138
And the JSON node "status" should exist

features/jsonld/input_output.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Feature: JSON-LD DTO input and output
309309
"""
310310
Then the response status code should be 400
311311
And the response should be in JSON
312-
And the JSON node "description" should be equal to "The input data is misformatted."
312+
And the JSON node "detail" should be equal to "The input data is misformatted."
313313

314314
@!mongodb
315315
Scenario: Reset password through an input DTO without DataTransformer

features/main/attribute_resource.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Feature: Resource attributes
100100
And the response should be in JSON
101101
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
102102
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
103-
And the JSON node "description" should be equal to 'Unable to generate an IRI for the item of type "ApiPlatform\Tests\Fixtures\TestBundle\Entity\IncompleteUriVariableConfigured"'
103+
And the JSON node "detail" should be equal to 'Unable to generate an IRI for the item of type "ApiPlatform\Tests\Fixtures\TestBundle\Entity\IncompleteUriVariableConfigured"'
104104

105105
Scenario: Uri variables with Post operation
106106
When I add "Content-Type" header equal to "application/ld+json"

features/main/crud.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Feature: Create-Retrieve-Update-Delete
9696
When I add "Content-Type" header equal to "application/ld+json"
9797
And I send a "POST" request to "/dummies"
9898
Then the response status code should be 400
99-
And the JSON node "description" should be equal to "Syntax error"
99+
And the JSON node "detail" should be equal to "Syntax error"
100100

101101
Scenario: Get a not found exception
102102
When I send a "GET" request to "/dummies/42"
@@ -554,7 +554,7 @@ Feature: Create-Retrieve-Update-Delete
554554
When I add "Content-Type" header equal to "application/ld+json"
555555
And I send a "PUT" request to "/dummies/1"
556556
Then the response status code should be 400
557-
And the JSON node "description" should be equal to "Syntax error"
557+
And the JSON node "detail" should be equal to "Syntax error"
558558

559559
Scenario: Delete a resource
560560
When I send a "DELETE" request to "/dummies/1"

features/main/not_exposed.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Feature: Expose only a collection of objects
171171
When I send a "GET" request to "<uri>"
172172
Then the response status code should be 404
173173
And the response should be in JSON
174-
And the JSON node "description" should be equal to "<description>"
174+
And the JSON node "detail" should be equal to "<description>"
175175
Examples:
176176
| uri | description |
177177
| /tables/12345 | This route does not aim to be called. |
@@ -181,7 +181,7 @@ Feature: Expose only a collection of objects
181181
When I send a "GET" request to "<uri>"
182182
Then the response status code should be 404
183183
And the response should be in JSON
184-
And the JSON node "description" should be equal to "<description>"
184+
And the JSON node "detail" should be equal to "<description>"
185185
Examples:
186186
| uri | description |
187187
| /.well-known/genid/12345 | This route is not exposed on purpose. It generates an IRI for a collection resource without identifier nor item operation. |

features/main/relation.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ Feature: Relations support
472472
Then the response status code should be 400
473473
And the response should be in JSON
474474
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
475-
And the JSON node "description" should contain 'Invalid IRI "certainly not an IRI".'
475+
And the JSON node "detail" should contain 'Invalid IRI "certainly not an IRI".'
476476

477477
Scenario: Passing an invalid type to a relation
478478
When I add "Content-Type" header equal to "application/ld+json"
@@ -495,18 +495,18 @@ Feature: Relations support
495495
"type": "string",
496496
"pattern": "^hydra:Error$"
497497
},
498-
"title": {
498+
"hydra:title": {
499499
"type": "string",
500500
"pattern": "^An error occurred$"
501501
},
502-
"description": {
502+
"detail": {
503503
"pattern": "^The type of the \"ApiPlatform\\\\Tests\\\\Fixtures\\\\TestBundle\\\\(Document|Entity)\\\\RelatedDummy\" resource must be \"array\" \\(nested document\\) or \"string\" \\(IRI\\), \"integer\" given.$"
504504
}
505505
},
506506
"required": [
507507
"@type",
508-
"title",
509-
"description"
508+
"hydra:title",
509+
"detail"
510510
]
511511
}
512512
"""

features/main/union_intersect_types.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,4 @@ Feature: Union/Intersect types
118118
Then the response status code should be 400
119119
And the response should be in JSON
120120
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
121-
And the JSON node "description" should be equal to 'Could not denormalize object of type "ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\Issue5452\ActivableInterface", no supporting normalizer found.'
121+
And the JSON node "detail" should be equal to 'Could not denormalize object of type "ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\Issue5452\ActivableInterface", no supporting normalizer found.'

0 commit comments

Comments
 (0)