-
-
Notifications
You must be signed in to change notification settings - Fork 933
Fix #3982 maxDepth property of the ApiSubresource annotation not working #3986
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
fixing... |
*/ | ||
public function __construct($maxDepth = null) | ||
{ | ||
if (!\is_array($maxDepth)) { // @phpstan-ignore-line |
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.
Shouldn't we modify the PHPDoc?
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.
Not really as we want to keep the auto documentation as we did in https://github.com/api-platform/core/blob/main/src/Annotation/ApiResource.php this happens only when using this class as a php 8 attribute
…ion not working
…ructure to appease phpstan
thanks @crbanman ! |
…ion not working (api-platform#3986) * fix api-platform#3982 maxDepth property of the ApiSubresource annotation not working * always pass array to hydrateAttributes() * add test for ApiSubresource and further align with other annotations with same trait * remove AttributesHydratorTrait * handle null case * remove array type from $maxDepth parameter and changed constructor structure to appease phpstan * have phpstan ignore a test line
maxDepth
parameter of theApiSubresource
not working