-
-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert HTTP method to uppercase #2712
Conversation
lyrixx
commented
Apr 7, 2019
•
edited
edited
Q | A |
---|---|
Bug fix? | no, but prevent bug in client application |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | |
License | MIT |
Doc PR |
…ion-language Use framework expression language service instead of custom one
…types [GraphQL] Custom types
GraphQL: Prevent an error when the type factory is null
merging 2.4 into master nothing to see here
Add tests for the SoMany collection Uses the PropertyAccessor service and don't break the BC Allow to use multiple fields Fix cs Improve cursor-based pagination tests
Enable the pagination via cursor (no page-based pagination)
Merge 2.4 onto master
* Better support for graphql pagination Add support for graphql before, last, startcursor * Allow limit 0 for MongoDB * Fix backwards pagination * Add hasPreviousPage
Cleanup configuration
…lias Configure formats provider interface autowiring alias
* Avoid to call serialize in ItemNormalizer * Allow composite identifiers in getItemIriFromResourceClass
182cdab
to
b219add
Compare
Could you add a test? |
src/Metadata/Resource/Factory/OperationResourceMetadataFactory.php
Outdated
Show resolved
Hide resolved
Can't we just convert the HTTP method to uppercase, since that's what they should be in anyway? |
If you think this is a good approach, let's do it. I will update the PR |
0a21e6b
to
28369bb
Compare
47b2e43
to
843e491
Compare
PR Updated |
@@ -123,6 +123,8 @@ private function normalize(bool $collection, ResourceMetadata $resourceMetadata, | |||
$supported ? $operation['method'] = $upperOperationName : $operation['route_name'] = $operationName; | |||
} | |||
|
|||
$operation['method'] = strtoupper($operation['method']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem correct to me. $operation['method']
might not be set.
Anyway, this part of the code could probably use some refactoring. $upperOperationName
is... weird. 🙈
843e491
to
637e4c2
Compare