-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PropertyInfo] Support nullable array or collection #22251
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
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.
👍 except this minor comment.
@@ -242,7 +242,7 @@ private function getDocBlockFromProperty($class, $property) | |||
* @param string $ucFirstProperty | |||
* @param int $type | |||
* | |||
* @return DocBlock|null | |||
* @return array|null |
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 change should be reverted (this method returns an instance of DocBlock, not an array).
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 you forgot to expand the code :)
Look at the line 287
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.
My bad, indeed it's ok.
Thanks for fixing this bug @4rthem. |
This PR was merged into the 2.8 branch. Discussion ---------- [PropertyInfo] Support nullable array or collection | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22248 | License | MIT | Doc PR | `@var array|null` was always considered as not nullable in the `PhpDocExtractor`. Commits ------- 74ee588 support nullable array or collection
@var array|null
was always considered as not nullable in thePhpDocExtractor
.