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

Expected ";" when you have a "use Object;" statement. #205

Open
felixfbecker opened this issue Nov 3, 2017 · 2 comments
Open

Expected ";" when you have a "use Object;" statement. #205

felixfbecker opened this issue Nov 3, 2017 · 2 comments

Comments

@felixfbecker
Copy link

From @silbinarywolf on November 3, 2017 0:42

Silverstripe 3.6 uses the class name "Object" and runs fine in PHP 7.1.

I'm aware Object is a soft keyword and could stop working in future PHP versions, but until then, can this please be fixed.

Example code that gets an error:
https://github.com/SilbinaryWolf/silverstripe-phpstan/blob/master/src/MethodClassReflectionExtension.php#L19

Test repo, should be able to just composer install and test with the language server:
https://github.com/SilbinaryWolf/silverstripe-phpstan-testproject

Copied from original issue: felixfbecker/php-language-server#516

@nesl247
Copy link

nesl247 commented Nov 17, 2017

Also to be clear this is not allowed in PHP 7.2 and further according to https://wiki.php.net/rfc/object-typehint.

@silbinarywolf
Copy link

If it's still possible and fairly simple to support this kind of statement for PHP 7.1 and lower, that'd be fantastic.

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

No branches or pull requests

3 participants