-
Notifications
You must be signed in to change notification settings - Fork 44
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
Lack of support for nullable types #49
Comments
Hello @ircmaxell, @nikic Eric |
@ircmaxell, have you checked this fix I propose ? Eric |
The only issue I see there is that it throws away the nullability. It makes it so it parses, but it also "forgets" that type is nullable. Looking a bit deeper, I don't see how this error is possible. You're geting a call to |
I have tried with the latest 1.0 (there is a lot of error in the latest master ?) and it's Ok |
My example on branch v1.0. Created foo.php: Then I run command: There is no errors and result contains:
So it looks ok. The latest master is using syntax from php 7.4, so it`s unusable on any stable php release. |
PHP 7.1 and above has nullable types.
Parser doesn`t recognize them.
Example:
Change the example function declaration at the bottom of demo.php and add nullable type:
Effect:
The text was updated successfully, but these errors were encountered: