Uh oh!
There was an error while loading. Please reload this page.
feat: allow restricting operations for parameter attributes on properties - #7899
Conversation
604e56d to
b6ba5e3Compare| } | ||
| $propertyName = $reflectionProperty->getName(); | ||
| $key = $parameter->getKey() ?? $propertyName; |
There was a problem hiding this comment.
no functional test for the default propertyName value can you add one?
There was a problem hiding this comment.
Good catch! Changing the value of $propertyName did not cause the tests to fail.
Added unit and functional tests in #7870 (https://github.com/api-platform/core/compare/04dd41f03a46783113c0e3c876d6dae2b1d98f93..6947b111887145ee1f777d4be5308499eb42ce09) and rebased on it.
| $parameter = $attribute->newInstance(); | ||
| if ( | ||
| null !== ($parameterOperations = $parameter->getOperations()) |
There was a problem hiding this comment.
not sure about this, how would it work? Should we declare the parameter on all operations or maybe just GetCollection? Or is it that you give an array of operations to the parameter Parameter(operations: [GetCollection::class]) ? I haven't seen any functional test showing this functionality.
There was a problem hiding this comment.
an array of operations to the parameter Parameter(operations: [GetCollection::class]). The operation must also be declared in the ApiResourceoperations array.
b6ba5e3 to
fcd2878Comparefcd2878 to
f0ca1fdComparef0ca1fd to
21cfe04Compare21cfe04 to
16dcdbbCompare16dcdbb to
a1eb284Compare
Requires #7870