Skip to content

Commit 7e50ddd

Browse files
authored
Merge pull request #2734 from api-platform/ensure-verb-is-uppercase
Convert HTTP method to uppercase
2 parents 39900b9 + f0b3e9a commit 7e50ddd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Metadata/Resource/Factory/OperationResourceMetadataFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ private function normalize(bool $collection, ResourceMetadata $resourceMetadata,
123123
$supported ? $operation['method'] = $upperOperationName : $operation['route_name'] = $operationName;
124124
}
125125

126+
if (isset($operation['method'])) {
127+
$operation['method'] = strtoupper($operation['method']);
128+
}
129+
126130
$newOperations[$operationName] = $operation;
127131
}
128132

0 commit comments

Comments
 (0)