Skip to content

Commit c607d13

Browse files
authored
Correct the subresourceOperations php8 attribute (#1295)
1 parent 5fb5b7d commit c607d13

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/subresources.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ use ApiPlatform\Core\Annotation\ApiResource;
141141
142142
#[ApiResource(
143143
subresourceOperations: [
144-
'api_questions_answer_get_subresource': [
144+
'api_questions_answer_get_subresource' => [
145145
'method' => 'GET',
146146
'normalization_context': [
147147
'groups': ['foobar'],
@@ -206,7 +206,7 @@ You can control the path of subresources with the `path` option of the `subresou
206206
207207
#[ApiResource(
208208
subresourceOperations: [
209-
'api_questions_answer_get_subresource': [
209+
'api_questions_answer_get_subresource' => [
210210
'method' => 'GET',
211211
'path' => '/questions/{id}/all-answers',
212212
],
@@ -227,7 +227,7 @@ The `subresourceOperations` attribute also allows you to add an access control o
227227
228228
#[ApiResource(
229229
subresourceOperations: [
230-
'api_questions_answer_get_subresource': [
230+
'api_questions_answer_get_subresource' => [
231231
'security' => "has_role('ROLE_AUTHENTICATED')",
232232
],
233233
],

0 commit comments

Comments
 (0)