@@ -21,8 +21,8 @@ To deprecate a resource class, use the `deprecationReason` attribute:
2121
2222``` php
2323<?php
24- // api/src/Entity /Parchment.php
25- namespace App\Entity ;
24+ // api/src/ApiResource /Parchment.php with Symfony or app/ApiResource/Parchment.php with Laravel
25+ namespace App\ApiResource ;
2626
2727use ApiPlatform\Metadata\ApiResource;
2828
@@ -51,8 +51,8 @@ You can also use this new `deprecationReason` attribute to deprecate specific [o
5151
5252``` php
5353<?php
54- // api/src/Entity /Parchment.php
55- namespace App\Entity ;
54+ // api/src/ApiResource /Parchment.php with Symfony or app/ApiResource/Parchment.php with Laravel
55+ namespace App\ApiResource ;
5656
5757use ApiPlatform\Metadata\ApiResource;
5858use ApiPlatform\Metadata\Get;
@@ -71,8 +71,8 @@ It's also possible to deprecate a single property:
7171
7272``` php
7373<?php
74- // api/src/Entity /Review.php
75- namespace App\Entity ;
74+ // api/src/ApiResource /Review.php with Symfony or app/ApiResource/Review.php with Laravel
75+ namespace App\ApiResource ;
7676
7777use ApiPlatform\Metadata\ApiResource;
7878use ApiPlatform\Metadata\ApiProperty;
@@ -91,9 +91,10 @@ class Review
9191
9292``` yaml
9393# api/config/api_platform/resources/Review.yaml
94+ # The YAML syntax is only supported for Symfony
9495properties :
9596 # ...
96- App\Entity \Review :
97+ App\ApiResource \Review :
9798 # ...
9899 letter :
99100 deprecationReason : ' Use the rating property instead'
@@ -114,8 +115,8 @@ Thanks to the `sunset` attribute, API Platform makes it easy to set this header
114115
115116` ` ` php
116117<?php
117- // api/src/Entity /Parchment.php
118- namespace App\E ntity ;
118+ // api/src/ApiResource /Parchment.php with Symfony or app/ApiResource/Parchment.php with Laravel
119+ namespace App\A piResource ;
119120
120121use ApiPlatform\M etadata\A piResource;
121122
@@ -136,8 +137,8 @@ It's also possible to set the `Sunset` header only for a specific [operation](op
136137
137138` ` ` php
138139<?php
139- // api/src/Entity /Parchment.php
140- namespace App\E ntity ;
140+ // api/src/ApiResource /Parchment.php with Symfony or app/ApiResource/Parchment.php with Laravel
141+ namespace App\A piResource ;
141142
142143use ApiPlatform\M etadata\A piResource;
143144use ApiPlatform\M etadata\G et;
@@ -162,8 +163,8 @@ You can prefix your URI Templates and change the representation using serializat
162163
163164` ` ` php
164165<?php
165- // api/src/Entity /Parchment.php
166- namespace App\M odel ;
166+ // api/src/ApiResource /Parchment.php with Symfony or app/ApiResource/Parchment.php with Laravel
167+ namespace App\A piResource ;
167168
168169use ApiPlatform\M etadata\G et;
169170use Symfony\C omponent\S erializer\A ttrbute\G roups;
0 commit comments