Skip to content

Fix all occurrences of the old ApiPlatform/Api namespace #2161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 7, 2025
12 changes: 6 additions & 6 deletions core/bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions core/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -711,7 +711,7 @@ If you need to globally configure all the resources instead of adding configurat
<?php
// config/api-platform.php

use ApiPlatform\Api\UrlGeneratorInterface;
use ApiPlatform\Metadata\UrlGeneratorInterface;

return [
'defaults' => [
Expand Down
2 changes: 1 addition & 1 deletion core/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/identifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion core/mercure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion core/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions core/url-generation-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -42,7 +42,7 @@ api_platform:
return [
// ....
'defaults' => [
'url_generation_strategy' => ApiPlatform\Api\UrlGeneratorInterface::ABS_URL
'url_generation_strategy' => ApiPlatform\Metadata\UrlGeneratorInterface::ABS_URL
],
];
```
Expand All @@ -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
Expand Down