-
Notifications
You must be signed in to change notification settings - Fork 1.5k
CASE conditions using class constants named NAMESPACE/INTERFACE/TRAIT etc are incorrectly tokenized #1218
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
Comments
I ran your phpcs.xml file over that file from the error message using 2.7.0, 3.0.0RC1 and both the master and 3.0 branches and I can't replicate any problems. I've also cloned your repo and run PHPCS directly inside it to see if it is an integration issue, and I get no errors. I've tried PHP 7 and PHP 5 version, with no difference either. Is this an error you can actually reproduce? |
Yes, it happens locally and in CI, on the |
Thanks. I missed the branch name. Strangely, Travis shows master as the branch for that failed build, but that's obviously not the case. |
Smallest bit of code to replicate: switch ($foo) {
case Foo::NAMESPACE:
return true;
} |
…CE/INTERFACE/TRAIT etc are incorrectly tokenized
Thanks for the report. It has been fixed. I've moved the code that determines that |
any ETA for a release containing the fix? |
Hopefully next week. |
@gsherwood I need to merge that PR, but it breaks the build because of this bug. Tried updating to latest master, but apparently the |
The Config class doesn't exist in the master branch. It's a new class in 3.x, so you'd want to pull from the 3.0 branch. |
Thanks, it works now |
@gsherwood I really need this fix and depending on the dev branch broke my builds multiple times now. Could you tag a new RC? |
https://travis-ci.org/felixfbecker/php-language-server#L189
The text was updated successfully, but these errors were encountered: