From 94745cf7b7b11dc4c13fe3e556b7958aabd5c90f Mon Sep 17 00:00:00 2001 From: Ingo van Peeren Date: Wed, 7 May 2025 11:07:44 +0200 Subject: [PATCH 1/7] Update url-generation-strategy.md to fix old namespace ApiPlatform/Api --- core/url-generation-strategy.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/url-generation-strategy.md b/core/url-generation-strategy.md index e918663680c..b997b85d64a 100644 --- a/core/url-generation-strategy.md +++ b/core/url-generation-strategy.md @@ -32,7 +32,7 @@ It can be configured globally using one of the configurations below: # api/config/packages/api_platform.yaml api_platform: defaults: - url_generation_strategy: !php/const ApiPlatform\Api\UrlGeneratorInterface::ABS_URL + url_generation_strategy: !php/const ApiPlatform\Metadata\UrlGeneratorInterface::ABS_URL ``` ### Configure URL Generation Globally using Laravel @@ -42,7 +42,7 @@ api_platform: return [ // .... 'defaults' => [ - 'url_generation_strategy' => ApiPlatform\Api\UrlGeneratorInterface::ABS_URL + 'url_generation_strategy' => ApiPlatform\Metadata\UrlGeneratorInterface::ABS_URL ], ]; ``` @@ -60,7 +60,7 @@ It can also be configured only for a specific resource: namespace App\ApiResource; use ApiPlatform\Metadata\ApiResource; -use ApiPlatform\Api\UrlGeneratorInterface; +use ApiPlatform\Metadata\UrlGeneratorInterface; #[ApiResource(urlGenerationStrategy: UrlGeneratorInterface::ABS_URL)] class Book From e90341c552bf0073f5d88457e1a24384c14eb840 Mon Sep 17 00:00:00 2001 From: Ingo van Peeren Date: Wed, 7 May 2025 11:17:31 +0200 Subject: [PATCH 2/7] Update configuration.md to fix old namespace ApiPlatform\Api --- core/configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/configuration.md b/core/configuration.md index 55a0e4d3bdb..0d55bd5c506 100644 --- a/core/configuration.md +++ b/core/configuration.md @@ -374,7 +374,7 @@ api_platform: host: ~ # The URL generation strategy to use for IRIs - url_generation_strategy: !php/const ApiPlatform\Api\UrlGeneratorInterface::ABS_PATH + url_generation_strategy: !php/const ApiPlatform\Metadata\UrlGeneratorInterface::ABS_PATH # To enable collecting denormalization errors collectDenormalizationErrors: false @@ -711,7 +711,7 @@ If you need to globally configure all the resources instead of adding configurat [ From 53749b8e82307c9a0f473e9f6bd98d56da240697 Mon Sep 17 00:00:00 2001 From: Ingo van Peeren Date: Wed, 7 May 2025 11:21:40 +0200 Subject: [PATCH 3/7] Update bootstrap.md to fix old namespace ApiPlatform\Api --- core/bootstrap.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/bootstrap.md b/core/bootstrap.md index 21bab4c747d..68c6906ba8c 100644 --- a/core/bootstrap.md +++ b/core/bootstrap.md @@ -23,12 +23,12 @@ use ApiPlatform\Action\EntrypointAction; use ApiPlatform\Action\ExceptionAction; use ApiPlatform\Action\NotExposedAction; use ApiPlatform\Action\PlaceholderAction; -use ApiPlatform\Api\IdentifiersExtractor; -use ApiPlatform\Api\ResourceClassResolver; -use ApiPlatform\Api\UriVariablesConverter; -use ApiPlatform\Api\UriVariableTransformer\DateTimeUriVariableTransformer; -use ApiPlatform\Api\UriVariableTransformer\IntegerUriVariableTransformer; -use ApiPlatform\Api\UrlGeneratorInterface as ApiUrlGeneratorInterface; +use ApiPlatform\Metadata\IdentifiersExtractor; +use ApiPlatform\Metadata\ResourceClassResolver; +use ApiPlatform\Metadata\UriVariablesConverter; +use ApiPlatform\Metadata\UriVariableTransformer\DateTimeUriVariableTransformer; +use ApiPlatform\Metadata\UriVariableTransformer\IntegerUriVariableTransformer; +use ApiPlatform\Metadata\UrlGeneratorInterface as ApiUrlGeneratorInterface; use ApiPlatform\Symfony\Validator\EventListener\ValidationExceptionListener; use ApiPlatform\Documentation\DocumentationInterface; use ApiPlatform\Symfony\EventListener\AddFormatListener; From b91ccb6f127840c37b9950da38506bd3edc127b8 Mon Sep 17 00:00:00 2001 From: Ingo van Peeren Date: Wed, 7 May 2025 11:22:37 +0200 Subject: [PATCH 4/7] Update identifiers.md to fix old namespace ApiPlatform\Api --- core/identifiers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/identifiers.md b/core/identifiers.md index 07a383c4fdc..2953fbe969c 100644 --- a/core/identifiers.md +++ b/core/identifiers.md @@ -96,7 +96,7 @@ This case is covered by an URI variable transformer: // api/src/Identifier/UuidUriVariableTransformer.php with Symfony namespace App\Identifier; -use ApiPlatform\Api\UriVariableTransformerInterface; +use ApiPlatform\Metadata\UriVariableTransformerInterface; use ApiPlatform\Exception\InvalidUriVariableException; use App\Uuid; From c00e2e5387366519a807748d381117a6b016964f Mon Sep 17 00:00:00 2001 From: Ingo van Peeren Date: Wed, 7 May 2025 11:23:35 +0200 Subject: [PATCH 5/7] Update filters.md to fix old namespace ApiPlatform\Api --- core/filters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/filters.md b/core/filters.md index cdd61c7b6fb..80f27ec145e 100644 --- a/core/filters.md +++ b/core/filters.md @@ -343,7 +343,7 @@ If you want to include some properties of the nested "author" document, use: `/b ## Creating Custom Filters -Custom filters can be written by implementing the `ApiPlatform\Api\FilterInterface` interface. +Custom filters can be written by implementing the `ApiPlatform\Metadata\FilterInterface` interface. API Platform provides a convenient way to create Doctrine ORM and MongoDB ODM filters. If you use [custom state providers](state-providers.md), you can still create filters by implementing the previously mentioned interface, but - as API Platform isn't aware of your From abdce4d1e979dc06442056cf52a9167fa586b754 Mon Sep 17 00:00:00 2001 From: Ingo van Peeren Date: Wed, 7 May 2025 11:24:20 +0200 Subject: [PATCH 6/7] Update serialization.md to fix old namespace ApiPlatform\Api --- core/serialization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/serialization.md b/core/serialization.md index 4f0c780f28c..703870c0b19 100644 --- a/core/serialization.md +++ b/core/serialization.md @@ -648,7 +648,7 @@ Instead of sending an IRI to set a relation, you may want to send a plain identi namespace App\Serializer; -use ApiPlatform\Api\IriConverterInterface; +use ApiPlatform\Metadata\IriConverterInterface; use App\ApiResource\Dummy; use App\ApiResource\RelatedDummy; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; From 04caa9e1c0e9bf21723e8c26f3b2e04cefd1f6a5 Mon Sep 17 00:00:00 2001 From: Ingo van Peeren Date: Wed, 7 May 2025 11:24:56 +0200 Subject: [PATCH 7/7] Update mercure.md to fix old namespace ApiPlatform\Api --- core/mercure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mercure.md b/core/mercure.md index 11bea20a9c1..a8748656a38 100644 --- a/core/mercure.md +++ b/core/mercure.md @@ -133,7 +133,7 @@ Below is an example using the `topics` option: namespace App\ApiResource; use ApiPlatform\Metadata\ApiResource; -use ApiPlatform\Api\UrlGeneratorInterface; +use ApiPlatform\Metadata\UrlGeneratorInterface; use App\ApiResource\User; #[ApiResource(