Skip to content
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

Review PHP 7.1 feature: nullable types #202

Closed
asgrim opened this issue Jun 24, 2016 · 5 comments · Fixed by #272
Closed

Review PHP 7.1 feature: nullable types #202

asgrim opened this issue Jun 24, 2016 · 5 comments · Fixed by #272
Assignees
Milestone

Comments

@asgrim
Copy link
Member

asgrim commented Jun 24, 2016

https://wiki.php.net/rfc/nullable_types

Nullable types are coming in PHP 7.1 - we need to check we deal with these correctly in BR.

@asgrim asgrim added this to the 1.1.0 milestone Jun 24, 2016
@asgrim
Copy link
Member Author

asgrim commented Jul 3, 2016

PHP-Parser does not support this syntax at any version, issue reported at nikic/PHP-Parser#286

@asgrim asgrim self-assigned this Jul 3, 2016
@asgrim asgrim added the blocked label Jul 3, 2016
@asgrim
Copy link
Member Author

asgrim commented Jul 3, 2016

Also tracking other PHP 7.1 additions: nikic/PHP-Parser#260

@asgrim asgrim modified the milestones: 1.1.0, 1.2.0 Jul 6, 2016
@Ocramius Ocramius modified the milestones: 1.2.0, 1.3.0 Sep 26, 2016
@asgrim
Copy link
Member Author

asgrim commented Dec 5, 2016

Need to fix FindTypeFromAst before release - NullableType is introduced in PHP Parser 3.0, which we currently ignore in #217. Therefore FindTypeFromAst must be updated before release.

        // @todo Nullable types are effectively ignored - to be fixed
        /* @see https://github.com/Roave/BetterReflection/issues/202 */
        if ($astType instanceof NullableType) {
            $astType = $astType->type;
        }

Not sure how PhpDocumentor's TypeResolver library handles ?nullable types (if at all) which could be a blocker for us.

@asgrim asgrim removed the blocked label Dec 24, 2016
@asgrim asgrim modified the milestones: 1.3.0, 2.0.0 Mar 31, 2017
@asgrim asgrim added the blocked label Apr 16, 2017
@asgrim
Copy link
Member Author

asgrim commented Apr 16, 2017

Needs to be added upstream in phpDocumentor/TypeResolver - I'll patch it but I've queried Mike about how he'd prefer to see it implemented (ref: https://twitter.com/asgrim/status/853588473646919680 )

@asgrim
Copy link
Member Author

asgrim commented Apr 17, 2017

Created an issue, in retrospect, Twitter probably not the best place for conversation regarding this :) phpDocumentor/TypeResolver#31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants