Skip to content

Commit

Permalink
Merge 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Nov 30, 2023
2 parents ddc3b1c + f297d21 commit d85ed0c
Show file tree
Hide file tree
Showing 74 changed files with 1,111 additions and 173 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Update project dependencies
run: composer update --no-interaction --no-progress --ansi
run: |
composer update --no-interaction --no-progress --ansi
- name: Install PHPUnit
run: vendor/bin/simple-phpunit --version
- name: Cache PHPStan results
Expand Down Expand Up @@ -456,6 +457,7 @@ jobs:
- name: Update project dependencies
run: |
composer update --no-interaction --no-progress --ansi
composer require --dev doctrine/mongodb-odm-bundle
- name: Install PHPUnit
run: vendor/bin/simple-phpunit --version
- name: Clear test app cache
Expand Down
36 changes: 35 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changelog

## v3.2.7

Symfony 7 support.

### Bug fixes

* [183b4d637](https://github.com/api-platform/core/commit/183b4d6374a66ffaf33b3341b757a832d5a39799) fix(symfony): named arguments dependency injection
* [3d32d5e12](https://github.com/api-platform/core/commit/3d32d5e12b1d93be72064e12979402487aa3e49a) fix(openapi): entrypoint access vnd+openapi (#6012)
* [58f4a3dda](https://github.com/api-platform/core/commit/58f4a3dda820a0b61c7361f76a789f1560d8f8ab) fix: no boolean types for exclusive minimum and exclusive maximum open api (#5993)
* [5e8f5eb99](https://github.com/api-platform/core/commit/5e8f5eb99152a8914b725ffe3f4beea72ce6e5b6) fix(graphql): consider writable flag also for nested input types (#5954)
* [9848bd4d4](https://github.com/api-platform/core/commit/9848bd4d4917a97000119ee98a09916af469acd8) fix: missing eager joins on to-one relationships (#5992)
* [aa44dd726](https://github.com/api-platform/core/commit/aa44dd7264e6264ec3ec569f9f4be081927a67cb) fix(openapi): max cardinality
* [c2be40994](https://github.com/api-platform/core/commit/c2be40994ec08b51bf23b4b807eb3d4f984379ff) fix(symfony): error in provider without uri variables (#6005)
* [d2f281eed](https://github.com/api-platform/core/commit/d2f281eedbd87a3c1a3377bb23a229e1b17a0f45) fix(jsonschema): fix recursive documentation when using a dto entity wrapper (#5973)
* [e7bc2ab57](https://github.com/api-platform/core/commit/e7bc2ab5770fe673093596bc217516be61d582fc) fix(jsonschema): indirect resource input schema (#6001)

## v3.2.6

### Bug fixes

To have errors backward compatible with 3.1, use:

```yaml
api_platform:
defaults:
extra_properties:
rfc_7807_compliant_errors: false
```

New extension points are available using [Errors](https://api-platform.com/docs/v3.2/core/errors/) with `rfc_7807_compliant_errors: true` such as [Error provider](https://api-platform.com/docs/v3.2/guides/error-provider/) and [Error Resource](https://api-platform.com/docs/v3.2/guides/error-resource/)

* [1b4289412](https://github.com/api-platform/core/commit/1b42894128545ad72b19b6be1c31ad25351c9138) fix: errors bc with rfc_7807_compliant_errors false (#5974)
* [ce297e6f7](https://github.com/api-platform/core/commit/ce297e6f73e1797ede21312aa31af2b110e9e583) fix(jsonschema): child entity property schema generation (#5988) (#5989)

## v3.2.5

### Bug fixes
Expand Down Expand Up @@ -1911,4 +1945,4 @@ Please read #2825 if you have issues with the behavior of Readable/Writable Link
## 1.0.0 beta 2

* Preserve indexes when normalizing and denormalizing associative arrays
* Allow setting default order for property when registering a `Doctrine\Orm\Filter\OrderFilter` instance
* Allow setting default order for property when registering a `Doctrine\Orm\Filter\OrderFilter` instance
71 changes: 35 additions & 36 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"psr/cache": "^1.0 || ^2.0 || ^3.0",
"psr/container": "^1.0 || ^2.0",
"symfony/deprecation-contracts": "^3.1",
"symfony/http-foundation": "^6.1",
"symfony/http-kernel": "^6.1",
"symfony/property-access": "^6.1",
"symfony/property-info": "^6.1",
"symfony/serializer": "^6.1",
"symfony/http-foundation": "^6.1 || ^7.0",
"symfony/http-kernel": "^6.1 || ^7.0",
"symfony/property-access": "^6.1 || ^7.0",
"symfony/property-info": "^6.1 || ^7.0",
"symfony/serializer": "^6.1 || ^7.0",
"symfony/translation-contracts": "^3.3",
"symfony/web-link": "^6.1",
"symfony/web-link": "^6.1 || ^7.0",
"willdurand/negotiation": "^3.0"
},
"require-dev": {
Expand All @@ -35,7 +35,6 @@
"doctrine/dbal": "^3.4.0",
"doctrine/doctrine-bundle": "^1.12 || ^2.0",
"doctrine/mongodb-odm": "^2.2",
"doctrine/mongodb-odm-bundle": "^4.0",
"doctrine/orm": "^2.14",
"elasticsearch/elasticsearch": "^7.11 || ^8.4",
"friends-of-behat/mink-browserkit-driver": "^1.3.1",
Expand All @@ -56,36 +55,36 @@
"ramsey/uuid-doctrine": "^1.4 || ^2.0",
"soyuka/contexts": "v3.3.9",
"soyuka/stubs-mongodb": "^1.0",
"symfony/asset": "^6.1",
"symfony/browser-kit": "^6.1",
"symfony/cache": "^6.1",
"symfony/config": "^6.1",
"symfony/console": "^6.1",
"symfony/css-selector": "^6.1",
"symfony/dependency-injection": "^6.1.12",
"symfony/doctrine-bridge": "^6.1",
"symfony/dom-crawler": "^6.1",
"symfony/error-handler": "^6.1",
"symfony/event-dispatcher": "^6.1",
"symfony/expression-language": "^6.1",
"symfony/finder": "^6.1",
"symfony/form": "^6.1",
"symfony/framework-bundle": "^6.1",
"symfony/http-client": "^6.1",
"symfony/intl": "^6.1",
"symfony/asset": "^6.1 || ^7.0",
"symfony/browser-kit": "^6.1 || ^7.0",
"symfony/cache": "^6.1 || ^7.0",
"symfony/config": "^6.1 || ^7.0",
"symfony/console": "^6.1 || ^7.0",
"symfony/css-selector": "^6.1 || ^7.0",
"symfony/dependency-injection": "^6.1 || ^7.0.12",
"symfony/doctrine-bridge": "^6.1 || ^7.0",
"symfony/dom-crawler": "^6.1 || ^7.0",
"symfony/error-handler": "^6.1 || ^7.0",
"symfony/event-dispatcher": "^6.1 || ^7.0",
"symfony/expression-language": "^6.1 || ^7.0",
"symfony/finder": "^6.1 || ^7.0",
"symfony/form": "^6.1 || ^7.0",
"symfony/framework-bundle": "^6.1 || ^7.0",
"symfony/http-client": "^6.1 || ^7.0",
"symfony/intl": "^6.1 || ^7.0",
"symfony/maker-bundle": "^1.24",
"symfony/mercure-bundle": "*",
"symfony/messenger": "^6.1",
"symfony/phpunit-bridge": "^6.1",
"symfony/routing": "^6.1",
"symfony/security-bundle": "^6.1",
"symfony/security-core": "^6.1",
"symfony/stopwatch": "^6.1",
"symfony/twig-bundle": "^6.1",
"symfony/uid": "^6.1",
"symfony/validator": "^6.1",
"symfony/web-profiler-bundle": "^6.1",
"symfony/yaml": "^6.1",
"symfony/messenger": "^6.1 || ^7.0",
"symfony/phpunit-bridge": "^6.1 || ^7.0",
"symfony/routing": "^6.1 || ^7.0",
"symfony/security-bundle": "^6.1 || ^7.0",
"symfony/security-core": "^6.1 || ^7.0",
"symfony/stopwatch": "^6.1 || ^7.0",
"symfony/twig-bundle": "^6.1 || ^7.0",
"symfony/uid": "^6.1 || ^7.0",
"symfony/validator": "^6.1 || ^7.0",
"symfony/web-profiler-bundle": "^6.1 || ^7.0",
"symfony/yaml": "^6.1 || ^7.0",
"twig/twig": "^1.42.3 || ^2.12 || ^3.0",
"webonyx/graphql-php": "^14.0 || ^15.0"
},
Expand Down Expand Up @@ -145,7 +144,7 @@
"dev-main": "3.3.x-dev"
},
"symfony": {
"require": "^6.1"
"require": "^6.1 || ^7.0"
}
}
}
1 change: 0 additions & 1 deletion docs/guides/declare-a-resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// tags: design
// ---

// # Declare a Resource
// This class represents an API resource

namespace App\ApiResource {
Expand Down
2 changes: 0 additions & 2 deletions docs/guides/doctrine-entity-as-resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
// tags: doctrine
// executable: true
// ---

// # API Resource on a Doctrine Entity.
//
// API Platform is compatible with [Doctrine ORM](https://www.doctrine-project.org), all we need is to declare an

Expand Down
1 change: 0 additions & 1 deletion docs/guides/extend-openapi-documentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// tags: openapi, expert
// ---

// # Extend OpenAPI Documentation
namespace App\ApiResource {
use ApiPlatform\Metadata\Post;
use ApiPlatform\OpenApi\Model\Operation;
Expand Down
2 changes: 0 additions & 2 deletions docs/guides/handle-links.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
// executable: true
// ---

// # Handle links
//
// When using subresources with doctrine, API Platform tries to handle your links,
// and the algorithm sometimes overcomplicates SQL queries.

Expand Down
2 changes: 0 additions & 2 deletions docs/guides/hook-a-persistence-layer-with-a-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
// tags: design
// ---

// # Hook a Persistence Layer with a Processor

namespace App\ApiResource {
use ApiPlatform\Metadata\ApiResource;
use App\State\BookProcessor;
Expand Down
1 change: 0 additions & 1 deletion docs/guides/provide-the-resource-state.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// tags: design, state
// ---

// # Provide the Resource State
// Our model is the same then in the previous guide ([Declare a Resource](/playground/declare-a-resource). API Platform will declare
// CRUD operations if we don't declare them.

Expand Down
2 changes: 0 additions & 2 deletions docs/guides/subresource.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
// executable: true
// ---

// # Subresource
//
// In API Platform, a subresource is an alternate way to reach a Resource.

namespace App\Entity {
Expand Down
1 change: 0 additions & 1 deletion docs/guides/validate-incoming-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// tags: validation
// ---

// # Validing incoming data
// When processing the incoming request, when creating or updating content, API-Platform will validate the
// incoming content. It will use the [Symfony's validator](https://symfony.com/doc/current/validation.html).
//
Expand Down
73 changes: 73 additions & 0 deletions features/graphql/mutation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,79 @@ Feature: GraphQL mutation support
And the JSON node "data.updateDummy.dummy.relatedDummies.edges[0].node.name" should be equal to "RelatedDummy11"
And the JSON node "data.updateDummy.clientMutationId" should be equal to "myId"

@createSchema
@!mongodb
Scenario: Modify an item with embedded object through a mutation
Given there is a fooDummy objects with fake names and embeddable
When I send the following GraphQL request:
"""
mutation {
updateFooDummy(input: {id: "/foo_dummies/1", name: "modifiedName", embeddedFoo: {dummyName: "Embedded name"}, clientMutationId: "myId"}) {
fooDummy {
id
name
embeddedFoo {
dummyName
}
}
clientMutationId
}
}
"""
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/json"
And the JSON node "data.updateFooDummy.fooDummy.name" should be equal to "modifiedName"
And the JSON node "data.updateFooDummy.fooDummy.embeddedFoo.dummyName" should be equal to "Embedded name"
And the JSON node "data.updateFooDummy.clientMutationId" should be equal to "myId"

@createSchema
Scenario: Try to modify a non writable property through a mutation
Given there is a fooDummy objects with fake names and embeddable
When I send the following GraphQL request:
"""
mutation {
updateFooDummy(input: {id: "/foo_dummies/1", name: "modifiedName", nonWritableProp: "written", embeddedFoo: {dummyName: "Embedded name"}, clientMutationId: "myId"}) {
fooDummy {
id
name
embeddedFoo {
dummyName
}
}
clientMutationId
}
}
"""
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/json"
And the JSON node "errors[0].message" should match '/^Field "nonWritableProp" is not defined by type "?updateFooDummyInput"?\.$/'

@createSchema
@!mongodb
Scenario: Try to modify a non writable embedded property through a mutation
Given there is a fooDummy objects with fake names and embeddable
When I send the following GraphQL request:
"""
mutation {
updateFooDummy(input: {id: "/foo_dummies/1", name: "modifiedName", embeddedFoo: {dummyName: "Embedded name", nonWritableProp: "written"}, clientMutationId: "myId"}) {
fooDummy {
id
name
embeddedFoo {
dummyName
}
}
clientMutationId
}
}
"""
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/json"
And the JSON node "errors[0].message" should match '/^Field "nonWritableProp" is not defined by type "?FooEmbeddableNestedInput"?\.$/'

@!mongodb
Scenario: Modify an item with composite identifiers through a mutation
Given there are Composite identifier objects
Expand Down
3 changes: 2 additions & 1 deletion features/json/relation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Feature: JSON relations support
"badFourthLevel": null,
"id": 1,
"level": 3,
"test": true
"test": true,
"relatedDummies": []
}
"""

Expand Down

0 comments on commit d85ed0c

Please sign in to comment.