-
-
Notifications
You must be signed in to change notification settings - Fork 921
fix(metadata): defaults should not override values #4702
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
Conversation
silverbackdan
commented
Apr 4, 2022
Q | A |
---|---|
Branch? | main |
Tickets | #4699 |
License | MIT |
Doc PR | n/a |
Fix: #4699 |
…ults - do not overwrite operation properties with defaults
$upperProperty = ucfirst($key); | ||
$getter = "get$upperProperty"; | ||
|
||
if (method_exists($operation, $getter) && null === $operation->{$getter}()) { |
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.
I think just changing the condition would have been alright.
#[GetCollection( | ||
paginationClientItemsPerPage: true, | ||
paginationItemsPerPage: 5, | ||
paginationMaximumItemsPerPage: 30 | ||
)] |
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.
You cannot use PHP 8 attributes directly in the tests, you need to use annotations like before, they will be automatically converted to PHP attributes by our command (api:upgrade-resource
).
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.
you can you just need to flag them as @php8
tests :)
Thank you both :) |