microsoft / microsoft/tolerant-php-parser
Expected ";" when you have a "use Object;" statement.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 894
- Forks
- 85
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the example in src/MethodClassReflectionExtension.php at line 19 and reproduce the error using the linked test project after composer install. Trace how the parser handles a use Object; statement and find the relevant parser or error tests. Done means the statement parses without the unexpected semicolon error and has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100