From 16dd32d20ccb84048c6779aa9ee30640fb4829d8 Mon Sep 17 00:00:00 2001 From: D3xime <98166703+D3xime@users.noreply.github.com> Date: Fri, 11 Apr 2025 15:47:15 +0200 Subject: [PATCH 1/5] Added deserialize false Hello everyone, I am a new Developper who love using ApiPlatform but i encountered a bug when i tried to implement file handling in ApiPlatform. I reach out the documentation is misssing some data. The missing data was deserialize: false. This commit gives the following of this issues https://github.com/api-platform/docs/issues/2058. --- symfony/file-upload.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/symfony/file-upload.md b/symfony/file-upload.md index 5321853242b..40b2624ed91 100644 --- a/symfony/file-upload.md +++ b/symfony/file-upload.md @@ -100,7 +100,8 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich; ] ]) ) - ) + ), + deserialize: false ) ] )] From f791accf2df641739e680de1a6dc8a4b737910c3 Mon Sep 17 00:00:00 2001 From: D3xime <98166703+D3xime@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:29:44 +0200 Subject: [PATCH 2/5] Update content-negotiation.md --- core/content-negotiation.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/content-negotiation.md b/core/content-negotiation.md index 7194b60c855..d03cd75d931 100644 --- a/core/content-negotiation.md +++ b/core/content-negotiation.md @@ -356,7 +356,7 @@ merge new encoders and normalizers in API Platform. ## JSON:API sparse fieldset and sort parameters > [!WARNING] -> The SortFilter is for Eloquent, the Doctrine equivalent is the OrderFilter. +> The SortFilter is for Eloquent, the Doctrine equivalent is the OrderFilter. > The config/api-platform.php is Laravel specific. When working with JSON:API you may want to declare the `SparseFieldset` and the @@ -371,11 +371,11 @@ use ApiPlatform\JsonApi\Filter\SparseFieldset; use ApiPlatform\Laravel\Eloquent\Filter\JsonApi\SortFilter; return [ - // ... - 'parameters' => [ - new QueryParameter(key: 'fields', filter: SparseFieldset::class), - new QueryParameter(key: 'sort', filter: SortFilter::class), - ], + // ... + 'parameters' => [ + new QueryParameter(key: 'fields', filter: SparseFieldset::class), + new QueryParameter(key: 'sort', filter: SortFilter::class), + ], ]; ``` From be5a982d2555c0daaf8dc5f816299f4fc3350117 Mon Sep 17 00:00:00 2001 From: D3xime <98166703+D3xime@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:30:07 +0200 Subject: [PATCH 3/5] Update elasticsearch.md --- core/elasticsearch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/elasticsearch.md b/core/elasticsearch.md index 370085e987e..53b9db80951 100644 --- a/core/elasticsearch.md +++ b/core/elasticsearch.md @@ -8,7 +8,7 @@ application search, security analytics, metrics, logging, etc. API Platform comes natively with the **reading** support for Elasticsearch. It uses internally the official PHP client for Elasticsearch: [Elasticsearch-PHP](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html). -Be careful, API Platform only supports Elasticsearch >= 7.11.0 < 8.0 and Elasticsearch >= 8.4 < 9.0. Support for +Be careful, API Platform only supports Elasticsearch >= 7.11.0 < 8.0 and Elasticsearch >= 8.4 < 9.0. Support for Elasticsearch 8 was introduced in API Platform 3.2. ## Enabling Reading Support From 4fc8d671e5cf7f4151628cd4cb3530fd7a3d34bf Mon Sep 17 00:00:00 2001 From: D3xime <98166703+D3xime@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:30:38 +0200 Subject: [PATCH 4/5] Update errors.md --- core/errors.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/errors.md b/core/errors.md index 923e05d0f18..2bc78da84b7 100644 --- a/core/errors.md +++ b/core/errors.md @@ -330,7 +330,7 @@ Since 3.4, you also have the possibility to link your specific domain exceptions directly in your OpenAPI definition ! Let's say that you have a `Greetings` resource, and that one of its providers can throw the following exception for the -`ApiPlatform\Metadata\GetCollection` Operation: +`ApiPlatform\Metadata\GetCollection` Operation: ```php use ApiPlatform\Metadata\ErrorResource; @@ -369,7 +369,7 @@ class MyDomainException extends \Exception implements ProblemExceptionInterface ``` As long as your Exception implements `ApiPlatform\Metadata\Exception\ProblemExceptionInterface` and has the `ErrorResource` -attribute, you can then map it to your Operation this way: +attribute, you can then map it to your Operation this way: ```php use ApiPlatform\Metadata\ApiResource; From 2d53080ec51bb807d4f9680da07cedbe3bbf1c63 Mon Sep 17 00:00:00 2001 From: D3xime <98166703+D3xime@users.noreply.github.com> Date: Mon, 14 Apr 2025 10:31:08 +0200 Subject: [PATCH 5/5] Update releases.md --- extra/releases.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/releases.md b/extra/releases.md index 50655968081..37f68ddaadd 100644 --- a/extra/releases.md +++ b/extra/releases.md @@ -10,8 +10,8 @@ For example: - version 3.2 has been released on 12 October 2023; - version 3.3 has been released on 9 April 2024 (we were a little late, it should have been published in March); - versions 3.4 has been released on 18 September 2024; -- versions 4.0 has been released on 27 September 2024; -- versions 4.1 has been released on 28 February 2025; +- versions 4.0 has been released on 27 September 2024; +- versions 4.1 has been released on 28 February 2025; ## Maintenance