Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 1 commit into from
Apr 3, 2017

Conversation

4rthem
Copy link
Contributor

@4rthem 4rthem commented Apr 3, 2017

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.

Copy link
Member

@dunglas dunglas left a 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
Copy link
Member

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).

Copy link
Contributor Author

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

Copy link
Member

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.

@dunglas
Copy link
Member

dunglas commented Apr 3, 2017

Thanks for fixing this bug @4rthem.

@dunglas dunglas merged commit 74ee588 into symfony:2.8 Apr 3, 2017
dunglas added a commit that referenced this pull request Apr 3, 2017
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
@fabpot fabpot mentioned this pull request Apr 5, 2017
@fabpot fabpot mentioned this pull request Apr 5, 2017
@4rthem 4rthem deleted the array-nullable branch April 5, 2017 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants