Skip to content

Commit c7cd42c

Browse files
Dodger77soyuka
authored andcommitted
Fix all occurrences of the old ApiPlatform/Api namespace (#2161)
1 parent 036a06b commit c7cd42c

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
@@ -708,7 +708,7 @@ If you need to globally configure all the resources instead of adding configurat
708708
<?php
709709
// config/api-platform.php
710710

711-
use ApiPlatform\Api\UrlGeneratorInterface;
711+
use ApiPlatform\Metadata\UrlGeneratorInterface;
712712

713713
return [
714714
'defaults' => [

core/filters.md

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

402402
## Creating Custom Filters
403403

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

406406
API Platform provides a convenient way to create Doctrine ORM and MongoDB ODM filters. If you use [custom state providers](state-providers.md),
407407
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
@@ -94,7 +94,7 @@ This case is covered by an URI variable transformer:
9494
// api/src/Identifier/UuidUriVariableTransformer.php with Symfony or app/Identifier/UuidUriVariableTransformer.php with Laravel
9595
namespace App\Identifier;
9696

97-
use ApiPlatform\Api\UriVariableTransformerInterface;
97+
use ApiPlatform\Metadata\UriVariableTransformerInterface;
9898
use ApiPlatform\Exception\InvalidUriVariableException;
9999
use App\Uuid;
100100

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)