-
-
Notifications
You must be signed in to change notification settings - Fork 940
Get resource from parent #2760
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
Get resource from parent #2760
Conversation
4eeea0d to
dd9d48a
Compare
|
I think maybe adding to https://github.com/api-platform/core/blob/master/features/main/table_inheritance.feature is appropriate here? Edit: maybe not that feature, but at least a new functional test. |
|
@bendavies This PR is still in WIP, but yes I'll definitively add new behat tests 👍 |
hah ok :) all your checkboxes were done so i thought it was complete :) |
|
The main part of this PR is done, now it's time to add some non-regressions tests :) |
I think it should be the best place indeed. Thanks for it :) |
dd9d48a to
fce9c71
Compare
fce9c71 to
f96cbc4
Compare
f96cbc4 to
ba95062
Compare
ce6e679 to
ab8de31
Compare
ab8de31 to
07adbde
Compare
Previous commits fix the behavior with non api resources inherited from resource but relation management was still not ok since the update was not done on the abstract item normalizer. The resource class resolver is now used as it should in every normalizers. Most of this commit (tests) comes from @vincentchalamon and its PR api-platform#2760
Previous commits fix the behavior with non api resources inherited from resource but relation management was still not ok since the update was not done on the abstract item normalizer. The resource class resolver is now used as it should in every normalizers. Most of this commit (tests) comes from @vincentchalamon and its PR api-platform#2760
Previous commits fix the behavior with non api resources inherited from resource but relation management was still not ok since the update was not done on the abstract item normalizer. The resource class resolver is now used as it should in every normalizers. Most of this commit (tests) comes from @vincentchalamon and its PR api-platform#2760
|
|
||
| @!mongodb | ||
| @createSchema | ||
| @dropSchema |
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 doesn't exists anymore IIRC
| "pattern": "^/custom_users/\\d+$", | ||
| "required": "true" | ||
| } | ||
| } |
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.
| } | |
| }, | |
| "additionalProperties": false |
| "pattern": "^/external_users/\\d+$", | ||
| "required": "true" | ||
| } | ||
| } |
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.
| } | |
| }, | |
| "additionalProperties": false |
| $operation = $route->getDefault(sprintf('_api_%s_operation_name', $operationType)); | ||
| $methods = $route->getMethods(); | ||
|
|
||
| if (null !== $operation && (empty($methods) || \in_array('GET', $methods, true)) && null !== $currentResourceClass && is_a($resourceClass, $currentResourceClass, true)) { |
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.
Just asking but maybe we could add this if statement in the previous loop and saved the first value found that would be returned at the after the loop if not null to avoid looping through all routes twice here ?
|
Closing in favor of #2714 |
Previous commits fix the behavior with non api resources inherited from resource but relation management was still not ok since the update was not done on the abstract item normalizer. The resource class resolver is now used as it should in every normalizers. Most of this commit (tests) comes from @vincentchalamon and its PR api-platform#2760
Previous commits fix the behavior with non api resources inherited from resource but relation management was still not ok since the update was not done on the abstract item normalizer. The resource class resolver is now used as it should in every normalizers. Most of this commit (tests) comes from @vincentchalamon and its PR api-platform#2760
Previous commits fix the behavior with non api resources inherited from resource but relation management was still not ok since the update was not done on the abstract item normalizer. The resource class resolver is now used as it should in every normalizers. Most of this commit (tests) comes from @vincentchalamon and its PR api-platform#2760
Previous commits fix the behavior with non api resources inherited from resource but relation management was still not ok since the update was not done on the abstract item normalizer. The resource class resolver is now used as it should in every normalizers. Most of this commit (tests) comes from @vincentchalamon and its PR api-platform#2760
Previous commits fix the behavior with non api resources inherited from resource but relation management was still not ok since the update was not done on the abstract item normalizer. The resource class resolver is now used as it should in every normalizers. Most of this commit (tests) comes from @vincentchalamon and its PR api-platform#2760
|
See #2797 instead. |
features/graphql/non_resource.feature(false-positive in CI)