Skip to content

Commit

Permalink
Merge branch '4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Sep 20, 2024
2 parents e370d20 + 4d99196 commit e2d232a
Show file tree
Hide file tree
Showing 42 changed files with 439 additions and 215 deletions.
92 changes: 92 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
# Changelog

## v4.0.1

### Bug fixes

* [eb80a1a56](https://github.com/api-platform/core/commit/eb80a1a5651b81cab13b018662a0d21e05facbfe) fix(state): precise format on content-location (#6627)

### Features

* [4a2271670](https://github.com/api-platform/core/commit/4a2271670a88c318ab38bd7eb2a1c0b93a5c0ea0) feat: api-platform/json-hal component (#6621)

## v4.0.0

### Bug fixes

* [7c5689626](https://github.com/api-platform/core/commit/7c568962634691892fe1057b3c982765a1c20ba2) fix(laravel): call authorize on delete but not validation (#6618)
* [d74b2b5fa](https://github.com/api-platform/core/commit/d74b2b5fa939a9f5ca11d3538e358070047a6c3d) fix: swagger ui with route identifier (#6616)
* [de6e3f546](https://github.com/api-platform/core/commit/de6e3f546a26c5ad5444d8e2448d81faec36bd73) fix(laravel): validate enum schema within filter (#6615)
* [0a461d749](https://github.com/api-platform/core/commit/0a461d749b7b4ac706f3b7b6138a13cb6e4a9d2d) fix(symfony): allow schema restriction for collection like property from choice constraint (#6520)
* [0c66a494d](https://github.com/api-platform/core/commit/0c66a494d3bda5817e59da2e43f0232e2e8fea15) fix(laravel): cache metadata, add trace on debug mode (#6555)
* [1b6e7c6cc](https://github.com/api-platform/core/commit/1b6e7c6ccf3d2c61816a7dceb35f1d5980ea0565) fix(laravel): disable GraphQL by default and fix provider
* [290944103](https://github.com/api-platform/core/commit/290944103039a4a6d64904d1a89264b800c809d5) fix(laravel): SwaggerUI title (#6527)
* [2df0860b5](https://github.com/api-platform/core/commit/2df0860b577bb1ae0882096436f3eaeb91281901) fix(laravel): Eloquent date and datetime type detection (#6529)
* [2fc74f2e6](https://github.com/api-platform/core/commit/2fc74f2e651f229e982343c1cb0c6a2c5d5eee64) fix: remove PUT from default operations (#6570)
* [3b42c9ff2](https://github.com/api-platform/core/commit/3b42c9ff235de5feac555d0283c513a6e4643953) fix: deserialization path for not denormalizable relations collected errors (#6537)
* [3c554a605](https://github.com/api-platform/core/commit/3c554a605ec9d5f36dfd852c4f93f0ce582064c9) fix(laravel): docs _format and open swagger ui (#6595)
* [3c5aea80f](https://github.com/api-platform/core/commit/3c5aea80fdbed20216764f6d721fe4f37cf2889d) fix(symfony): load isApiResource metadata (#6562)
* [4ee209eff](https://github.com/api-platform/core/commit/4ee209effb0fd11789db9f016d6e90aa3cb942a9) fix(laravel): visible and hidden fields support (#6538)
* [6e15eb95f](https://github.com/api-platform/core/commit/6e15eb95fffb2deec3d381f5d6fd87e189772270) fix(laravel): register HydraPartialCollectionViewNormalizer (#6588)
* [86365be2a](https://github.com/api-platform/core/commit/86365be2a5b8e8d0050e09d4e401bb758aa8b7a8) fix(laravel): Eloquent PropertyAccessor (#6536)
* [a1dd0b54d](https://github.com/api-platform/core/commit/a1dd0b54d137d70f2163fa03690c1f4c74a549c0) fix(laravel): entrypoint with doc formats (#6552)
* [a4a53ab48](https://github.com/api-platform/core/commit/a4a53ab4838f4d17d3677952157b44ec165e3e3a) fix(laravel): identitifer is not writable unless marked as writable (#6531)
* [a6f355358](https://github.com/api-platform/core/commit/a6f355358a88e7cf7759db0dee41e185157ddc68) fix(laravel): do not normalize exception originalTrace (#6533)
* [bd6a57c4c](https://github.com/api-platform/core/commit/bd6a57c4c0b38d6f880a5bd79031a87033f707e6) fix(laravel): snake case props (#6532)
* [c31566602](https://github.com/api-platform/core/commit/c315666022185839742b8c5ef81601d85d8c3f4b) fix(laravel): api_doc route regex
* [ebc61d59d](https://github.com/api-platform/core/commit/ebc61d59d60eda3a020593cf4cb46c5d30548e46) fix(laravel): entrypoint serialization (#6541)

### Features

* [00787f32d](https://github.com/api-platform/core/commit/00787f32da54418de7d869cff218e22d8ae2ae1d) feat(laravel): automatically register policies (#6623)
* [06a647a80](https://github.com/api-platform/core/commit/06a647a80d4c6b7bfb3474d0685bcb445b56a5a8) feat(laravel): add CSV support (#6617)
* [a49bde1ea](https://github.com/api-platform/core/commit/a49bde1ea79ae4226b70c20f9bf967ac77e9ab89) feat(laravel): filter validations rules
* [03357fb90](https://github.com/api-platform/core/commit/03357fb90ac0003f0cec2002df01711d0fb99a1e) feat(laravel): supports more Eloquent types (#6544)
* [05e75be83](https://github.com/api-platform/core/commit/05e75be834c629e0487caaaedfe9fdf0bd5a7226) feat(doctrine): add new filter for filtering an entity using PHP backed enum, resolves #6506 (#6547) (#6560)
* [538648840](https://github.com/api-platform/core/commit/538648840dc7439b12033ed6f413f3167705da4d) feat(laravel): enable graphQl support (#6550)
* [5b9767be2](https://github.com/api-platform/core/commit/5b9767be215afdf61fccf8490d0a3a7018078ce5) feat(laravel): policy, auth and gate (#6523)
* [5e1233c57](https://github.com/api-platform/core/commit/5e1233c57a497d00a7c4bd3e3ad0cac25aeac014) feat(laravel): search filter (#6534)
* [9c461626f](https://github.com/api-platform/core/commit/9c461626f7d02f8d15487134b636f11966c19a5e) feat(laravel): provide a trait in addition to the annotation (#6543)
* [c9f18d4fb](https://github.com/api-platform/core/commit/c9f18d4fb833ea0b89ef18021cad491cf0600ef1) feat(laravel): eloquent filters (search, date, equals, or) (#6593)
* [e09e73efc](https://github.com/api-platform/core/commit/e09e73efc5b4a39ab33d00c5d5422d8d9f7b5e89) feat: remove hydra prefix (#6418)

## v4.0.0-alpha.5

### Bug fixes
Expand Down Expand Up @@ -45,6 +95,48 @@

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

## v3.4.0

### Deprecations:

Namespaces like `ApiPlatform/Api` or `ApiPlatform/Util` are deprecated and will be removed in 4.0.
You should now install `api-platform/symfony` instead of `api-platform/core`.

Read the [upgrade guide](https://api-platform.com/docs/core/upgrade-guide/) for detailed steps.

### Bug fixes

* [56153b755](https://github.com/api-platform/core/commit/56153b755151ee11c8c17fdc3fd919d544f078ac) fix(hydra): error hydra prefix (#6599)
* [7c89f66a5](https://github.com/api-platform/core/commit/7c89f66a534cc1100c3dab0a129381d307d9d8b4) fix: replace ApiPlatform\\Exception use by ApiPlatform\Metadata\\Exception (#6597)
* [a3a4a990d](https://github.com/api-platform/core/commit/a3a4a990d527136f093b022782a82e1d5b04c0b5) fix(metadata): loop on operations can be null
* [ef0ee6427](https://github.com/api-platform/core/commit/ef0ee6427f8056bcb2617c228a7cf9ffd9d29ccd) fix(doctrine): use parameter.property for filter value (#6572)
* [17c6b586c](https://github.com/api-platform/core/commit/17c6b586c5ab49437ac11dd092efdd5f0baf569b) fix(state): log on missing provider (#6519)
* [601ccfb42](https://github.com/api-platform/core/commit/601ccfb4243803f40a7fa7179e0661da59c88b86) fix(doctrine): move event listeners to doctrine/common (#6573)
* [6499e0aa5](https://github.com/api-platform/core/commit/6499e0aa5dd61fdff7706e7940cdf8c1fc3e18ef) fix: deprecate url generator interface namespace (#6575)
* [3c5aea80f](https://github.com/api-platform/core/commit/3c5aea80fdbed20216764f6d721fe4f37cf2889d) fix(symfony): load isApiResource metadata (#6562)
* [61af0cc90](https://github.com/api-platform/core/commit/61af0cc90c1e095edb12e32ef433a742ef46637e) fix(doctrine): allow doctrine/dbal:^4
* [e063b80af](https://github.com/api-platform/core/commit/e063b80afe012ca4a6c8999de55b59193e8ae0ae) fix: parameter context for filters (#6535)
* [e22392193](https://github.com/api-platform/core/commit/e22392193bb1fc71ece5abf393fa54b0745fc287) fix(state): security parameter with listeners (#6457)

Various fixes for components isolation.

### Features

* [130fb5a8c](https://github.com/api-platform/core/commit/130fb5a8c833430e5e09624b06f296e0bcb7ceed) feat: better path sorting for openapi UIs (#6583)
* [26d700e06](https://github.com/api-platform/core/commit/26d700e06035eaf4d04ddd52f3101dae690734d8) feat(symfony): add error page (#6389)
* [48267c9b6](https://github.com/api-platform/core/commit/48267c9b6a942b1fb54f0efcfa5b2d2ac47c93bf) feat(openapi): add error resources schemes (#6332)
* [e91c783a2](https://github.com/api-platform/core/commit/e91c783a2abf51bf2bdcf1230826108632c44a0d) feat(state): "deserializer_type" context (#6429)
* [17c6b586c](https://github.com/api-platform/core/commit/17c6b586c5ab49437ac11dd092efdd5f0baf569b) feat(state): log on missing provider (#6519)
* [05e75be83](https://github.com/api-platform/core/commit/05e75be834c629e0487caaaedfe9fdf0bd5a7226) feat(doctrine): add new filter for filtering an entity using PHP backed enum, resolves #6506 (#6547) (#6560)
* [0b985ae76](https://github.com/api-platform/core/commit/0b985ae760bc4689d3f5bbacebb21b35b334d0be) feat(state): add security to parameters (#6435)
* [63ccfd58c](https://github.com/api-platform/core/commit/63ccfd58c95b5aa4aa0353eb122d96ef35187222) feat: BackedEnum resources (#6309)
* [65296eaf1](https://github.com/api-platform/core/commit/65296eaf1eb18dc725e9316e9ab49b191aae43a3) feat(openapi): allow optional request body content (#6374)
* [7399fcf7e](https://github.com/api-platform/core/commit/7399fcf7eaf28cd649d137da1fdd54f69093e275) feat(symfony): skip error handler (#6463)
* [74986cb55](https://github.com/api-platform/core/commit/74986cb552182dc645bd1fc967faa0954dd59e0a) feat: inflector as service (#6447)
* [b47edb2a4](https://github.com/api-platform/core/commit/b47edb2a499c34e79c167f963e3a626a3e9d040a) feat(serializer): context IRI in HAL or JsonApi format (#6215)
* [db1241c66](https://github.com/api-platform/core/commit/db1241c66a08d226f57d8d61e0ec519071c6afdb) feat(openapi): make open_api_override_responses act on default 404 response generation (#6551)
* [e09e73efc](https://github.com/api-platform/core/commit/e09e73efc5b4a39ab33d00c5d5422d8d9f7b5e89) feat: remove hydra prefix (#6418)

## v3.4.0-alpha.5

### Deprecations:
Expand Down
79 changes: 42 additions & 37 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@
}
],
"require": {
"php": ">=8.1",
"php": ">=8.2",
"doctrine/inflector": "^1.0 || ^2.0",
"psr/cache": "^1.0 || ^2.0 || ^3.0",
"psr/container": "^1.0 || ^2.0",
"symfony/deprecation-contracts": "^3.1",
"symfony/http-foundation": "^6.4 || ^7.1",
"symfony/http-kernel": "^6.4 || ^7.1",
"symfony/property-access": "^6.4 || ^7.1",
"symfony/property-info": "^6.4 || ^7.1",
"symfony/serializer": "^6.4 || ^7.1",
"symfony/http-foundation": "^6.4 || ^7.0",
"symfony/http-kernel": "^6.4 || ^7.0",
"symfony/property-access": "^6.4 || ^7.0",
"symfony/property-info": "^6.4 || ^7.0",
"symfony/serializer": "^6.4 || ^7.0",
"symfony/translation-contracts": "^3.3",
"symfony/web-link": "^6.4 || ^7.1",
"symfony/web-link": "^6.4 || ^7.0",
"willdurand/negotiation": "^3.1"
},
"require-dev": {
Expand All @@ -49,6 +49,7 @@
"api-platform/openapi": "^3.4 || ^4.0",
"api-platform/ramsey-uuid": "^3.4 || ^4.0",
"api-platform/jsonld": "^3.4 || ^4.0",
"api-platform/json-hal": "^3.4 || ^4.0",
"api-platform/serializer": "^3.4 || ^4.0",
"api-platform/json-api": "^3.3 || ^4.0",
"api-platform/http-cache": "^3.4 || ^4.0",
Expand Down Expand Up @@ -96,36 +97,36 @@
"soyuka/contexts": "^3.3.10",
"soyuka/pmu": "^0.0.12",
"soyuka/stubs-mongodb": "^1.0",
"symfony/asset": "^6.4 || ^7.1",
"symfony/browser-kit": "^6.4 || ^7.1",
"symfony/cache": "^6.4 || ^7.1",
"symfony/config": "^6.4 || ^7.1",
"symfony/console": "^6.4 || ^7.1",
"symfony/css-selector": "^6.4 || ^7.1",
"symfony/dependency-injection": "^6.4 || ^7.1",
"symfony/doctrine-bridge": "^6.4.2 || ^7.1.2",
"symfony/dom-crawler": "^6.4 || ^7.1",
"symfony/error-handler": "^6.4 || ^7.1",
"symfony/event-dispatcher": "^6.4 || ^7.1",
"symfony/expression-language": "^6.4 || ^7.1",
"symfony/finder": "^6.4 || ^7.1",
"symfony/form": "^6.4 || ^7.1",
"symfony/framework-bundle": "^6.4 || ^7.1",
"symfony/http-client": "^6.4 || ^7.1",
"symfony/intl": "^6.4 || ^7.1",
"symfony/asset": "^6.4 || ^7.0",
"symfony/browser-kit": "^6.4 || ^7.0",
"symfony/cache": "^6.4 || ^7.0",
"symfony/config": "^6.4 || ^7.0",
"symfony/console": "^6.4 || ^7.0",
"symfony/css-selector": "^6.4 || ^7.0",
"symfony/dependency-injection": "^6.4 || ^7.0",
"symfony/doctrine-bridge": "^6.4.2 || ^7.0.2",
"symfony/dom-crawler": "^6.4 || ^7.0",
"symfony/error-handler": "^6.4 || ^7.0",
"symfony/event-dispatcher": "^6.4 || ^7.0",
"symfony/expression-language": "^6.4 || ^7.0",
"symfony/finder": "^6.4 || ^7.0",
"symfony/form": "^6.4 || ^7.0",
"symfony/framework-bundle": "^6.4 || ^7.0",
"symfony/http-client": "^6.4 || ^7.0",
"symfony/intl": "^6.4 || ^7.0",
"symfony/maker-bundle": "^1.24",
"symfony/mercure-bundle": "*",
"symfony/messenger": "^6.4 || ^7.1",
"symfony/routing": "^6.4 || ^7.1",
"symfony/security-bundle": "^6.4 || ^7.1",
"symfony/security-core": "^6.4 || ^7.1",
"symfony/stopwatch": "^6.4 || ^7.1",
"symfony/string": "^6.4 || ^7.1",
"symfony/twig-bundle": "^6.4 || ^7.1",
"symfony/uid": "^6.4 || ^7.1",
"symfony/validator": "^6.4 || ^7.1",
"symfony/web-profiler-bundle": "^6.4 || ^7.1",
"symfony/yaml": "^6.4 || ^7.1",
"symfony/messenger": "^6.4 || ^7.0",
"symfony/routing": "^6.4 || ^7.0",
"symfony/security-bundle": "^6.4 || ^7.0",
"symfony/security-core": "^6.4 || ^7.0",
"symfony/stopwatch": "^6.4 || ^7.0",
"symfony/string": "^6.4 || ^7.0",
"symfony/twig-bundle": "^6.4 || ^7.0",
"symfony/uid": "^6.4 || ^7.0",
"symfony/validator": "^6.4 || ^7.0",
"symfony/web-profiler-bundle": "^6.4 || ^7.0",
"symfony/yaml": "^6.4 || ^7.0",
"twig/twig": "^1.42.3 || ^2.12 || ^3.0",
"webonyx/graphql-php": "^15.0"
},
Expand All @@ -135,7 +136,7 @@
"doctrine/orm": "<2.14.0",
"doctrine/mongodb-odm": "<2.4",
"doctrine/persistence": "<1.3",
"symfony/framework-bundle": "6.4.6 || 7.1.6",
"symfony/framework-bundle": "6.4.6 || 7.0.6",
"symfony/var-exporter": "<6.1.1",
"phpunit/phpunit": "<9.5",
"phpspec/prophecy": "<1.15"
Expand Down Expand Up @@ -190,10 +191,14 @@
"dev-main": "4.0.x-dev"
},
"symfony": {
"require": "^6.4 || ^7.1"
"require": "^6.4 || ^7.0"
},
"pmu": {
"projects": ["./src/*/composer.json", "src/Doctrine/*/composer.json"]
},
"thanks": {
"name": "api-platform/api-platform",
"url": "https://github.com/api-platform/api-platform"
}
}
}
6 changes: 6 additions & 0 deletions docs/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,11 @@
},
"require-dev": {
"phpunit/phpunit": "^10"
},
"extra": {
"thanks": {
"name": "api-platform/api-platform",
"url": "https://github.com/api-platform/api-platform"
}
}
}
1 change: 1 addition & 0 deletions features/hydra/collection.feature
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Feature: Collections support
When I send a "GET" request to "/dummies?page=7"
Then the response status code should be 200
And the response should be in JSON
And the header "Content-Location" should be equal to "/dummies.jsonld?page=7"
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the JSON should be valid according to this schema:
"""
Expand Down
9 changes: 5 additions & 4 deletions features/main/crud.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Feature: Create-Retrieve-Update-Delete
Then the response status code should be 201
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the header "Content-Location" should be equal to "/dummies/1"
And the header "Content-Location" should be equal to "/dummies/1.jsonld"
And the header "Location" should be equal to "/dummies/1"
And the JSON should be equal to:
"""
Expand Down Expand Up @@ -106,6 +106,7 @@ Feature: Create-Retrieve-Update-Delete
Then the response status code should be 200
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the header "Content-Location" should be equal to "/dummies.jsonld"
And the JSON should be equal to:
"""
{
Expand Down Expand Up @@ -513,7 +514,7 @@ Feature: Create-Retrieve-Update-Delete
Then the response status code should be 200
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the header "Content-Location" should be equal to "/dummies/1"
And the header "Content-Location" should be equal to "/dummies/1.jsonld"
And the JSON should be equal to:
"""
{
Expand Down Expand Up @@ -571,7 +572,7 @@ Feature: Create-Retrieve-Update-Delete
Then the response status code should be 201
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the header "Content-Location" should be equal to "/processor_entities/1"
And the header "Content-Location" should be equal to "/processor_entities/1.jsonld"
And the header "Location" should be equal to "/processor_entities/1"
And the JSON should be equal to:
"""
Expand All @@ -596,7 +597,7 @@ Feature: Create-Retrieve-Update-Delete
Then the response status code should be 201
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the header "Content-Location" should be equal to "/provider_entities/1"
And the header "Content-Location" should be equal to "/provider_entities/1.jsonld"
And the header "Location" should be equal to "/provider_entities/1"
And the JSON should be equal to:
"""
Expand Down
8 changes: 4 additions & 4 deletions features/main/crud_abstract.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: Create-Retrieve-Update-Delete on abstract resource
Then the response status code should be 201
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the header "Content-Location" should be equal to "/concrete_dummies/1"
And the header "Content-Location" should be equal to "/concrete_dummies/1.jsonld"
And the header "Location" should be equal to "/concrete_dummies/1"
And the JSON should be equal to:
"""
Expand Down Expand Up @@ -92,7 +92,7 @@ Feature: Create-Retrieve-Update-Delete on abstract resource
Then the response status code should be 200
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the header "Content-Location" should be equal to "/concrete_dummies/1"
And the header "Content-Location" should be equal to "/concrete_dummies/1.jsonld"
And the JSON should be equal to:
"""
{
Expand All @@ -118,7 +118,7 @@ Feature: Create-Retrieve-Update-Delete on abstract resource
Then the response status code should be 200
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the header "Content-Location" should be equal to "/concrete_dummies/1"
And the header "Content-Location" should be equal to "/concrete_dummies/1.jsonld"
And the JSON should be equal to:
"""
{
Expand Down Expand Up @@ -150,7 +150,7 @@ Feature: Create-Retrieve-Update-Delete on abstract resource
Then the response status code should be 201
And the response should be in JSON
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
And the header "Content-Location" should be equal to "/concrete_dummies/1"
And the header "Content-Location" should be equal to "/concrete_dummies/1.jsonld"
And the header "Location" should be equal to "/concrete_dummies/1"
And the JSON should be equal to:
"""
Expand Down
Loading

0 comments on commit e2d232a

Please sign in to comment.