Skip to content

Commit da9f049

Browse files
authored
Fix all occurrences of the old ApiPlatform/Api namespace (#2161)
1 parent caff371 commit da9f049

7 files changed

+15
-15
lines changed

core/bootstrap.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ use ApiPlatform\Action\EntrypointAction;
2323
use ApiPlatform\Action\ExceptionAction;
2424
use ApiPlatform\Action\NotExposedAction;
2525
use ApiPlatform\Action\PlaceholderAction;
26-
use ApiPlatform\Api\IdentifiersExtractor;
27-
use ApiPlatform\Api\ResourceClassResolver;
28-
use ApiPlatform\Api\UriVariablesConverter;
29-
use ApiPlatform\Api\UriVariableTransformer\DateTimeUriVariableTransformer;
30-
use ApiPlatform\Api\UriVariableTransformer\IntegerUriVariableTransformer;
31-
use ApiPlatform\Api\UrlGeneratorInterface as ApiUrlGeneratorInterface;
26+
use ApiPlatform\Metadata\IdentifiersExtractor;
27+
use ApiPlatform\Metadata\ResourceClassResolver;
28+
use ApiPlatform\Metadata\UriVariablesConverter;
29+
use ApiPlatform\Metadata\UriVariableTransformer\DateTimeUriVariableTransformer;
30+
use ApiPlatform\Metadata\UriVariableTransformer\IntegerUriVariableTransformer;
31+
use ApiPlatform\Metadata\UrlGeneratorInterface as ApiUrlGeneratorInterface;
3232
use ApiPlatform\Symfony\Validator\EventListener\ValidationExceptionListener;
3333
use ApiPlatform\Documentation\DocumentationInterface;
3434
use ApiPlatform\Symfony\EventListener\AddFormatListener;

core/configuration.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ api_platform:
374374
host: ~
375375

376376
# The URL generation strategy to use for IRIs
377-
url_generation_strategy: !php/const ApiPlatform\Api\UrlGeneratorInterface::ABS_PATH
377+
url_generation_strategy: !php/const ApiPlatform\Metadata\UrlGeneratorInterface::ABS_PATH
378378

379379
# To enable collecting denormalization errors
380380
collectDenormalizationErrors: false
@@ -711,7 +711,7 @@ If you need to globally configure all the resources instead of adding configurat
711711
<?php
712712
// config/api-platform.php
713713

714-
use ApiPlatform\Api\UrlGeneratorInterface;
714+
use ApiPlatform\Metadata\UrlGeneratorInterface;
715715

716716
return [
717717
'defaults' => [

core/filters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ If you want to include some properties of the nested "author" document, use: `/b
343343

344344
## Creating Custom Filters
345345

346-
Custom filters can be written by implementing the `ApiPlatform\Api\FilterInterface` interface.
346+
Custom filters can be written by implementing the `ApiPlatform\Metadata\FilterInterface` interface.
347347

348348
API Platform provides a convenient way to create Doctrine ORM and MongoDB ODM filters. If you use [custom state providers](state-providers.md),
349349
you can still create filters by implementing the previously mentioned interface, but - as API Platform isn't aware of your

core/identifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ This case is covered by an URI variable transformer:
9696
// api/src/Identifier/UuidUriVariableTransformer.php with Symfony
9797
namespace App\Identifier;
9898

99-
use ApiPlatform\Api\UriVariableTransformerInterface;
99+
use ApiPlatform\Metadata\UriVariableTransformerInterface;
100100
use ApiPlatform\Exception\InvalidUriVariableException;
101101
use App\Uuid;
102102

core/mercure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Below is an example using the `topics` option:
133133
namespace App\ApiResource;
134134

135135
use ApiPlatform\Metadata\ApiResource;
136-
use ApiPlatform\Api\UrlGeneratorInterface;
136+
use ApiPlatform\Metadata\UrlGeneratorInterface;
137137
use App\ApiResource\User;
138138

139139
#[ApiResource(

core/serialization.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ Instead of sending an IRI to set a relation, you may want to send a plain identi
648648
649649
namespace App\Serializer;
650650
651-
use ApiPlatform\Api\IriConverterInterface;
651+
use ApiPlatform\Metadata\IriConverterInterface;
652652
use App\ApiResource\Dummy;
653653
use App\ApiResource\RelatedDummy;
654654
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;

core/url-generation-strategy.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ It can be configured globally using one of the configurations below:
3232
# api/config/packages/api_platform.yaml
3333
api_platform:
3434
defaults:
35-
url_generation_strategy: !php/const ApiPlatform\Api\UrlGeneratorInterface::ABS_URL
35+
url_generation_strategy: !php/const ApiPlatform\Metadata\UrlGeneratorInterface::ABS_URL
3636
```
3737
### Configure URL Generation Globally using Laravel
3838
@@ -42,7 +42,7 @@ api_platform:
4242
return [
4343
// ....
4444
'defaults' => [
45-
'url_generation_strategy' => ApiPlatform\Api\UrlGeneratorInterface::ABS_URL
45+
'url_generation_strategy' => ApiPlatform\Metadata\UrlGeneratorInterface::ABS_URL
4646
],
4747
];
4848
```
@@ -60,7 +60,7 @@ It can also be configured only for a specific resource:
6060
namespace App\ApiResource;
6161

6262
use ApiPlatform\Metadata\ApiResource;
63-
use ApiPlatform\Api\UrlGeneratorInterface;
63+
use ApiPlatform\Metadata\UrlGeneratorInterface;
6464

6565
#[ApiResource(urlGenerationStrategy: UrlGeneratorInterface::ABS_URL)]
6666
class Book

0 commit comments

Comments
 (0)