-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
PHP tokenizer change broke my sniff in 2.5.2 #893
Comments
By running -vv over some code and checking the output, I've found that this code: <?php
switch ( $a ) {
default:
do {
$a = 'b';
} while ( $a );
return 5;
default:
foreach ( $a as $b ) {
$e = 'b';
}
return 5;
} is getting tokenized incorrectly in the new version. The old version tokenized it like this:
and the new code does this:
The real problem is that |
Can you try again now that I've pushed a fix for this tokenizing issue. It might have been the only cause. |
Yes it did fix the issue and didn't broke any of the other sniffs. Thanks. But what PHP_CodeSniffer commit created such a problem? |
Ah, I see you've specified it in commit message for a fix. |
Thanks for testing the fix. |
… to fix error when comment is not a docblock
In the 2.5.2 version (current
dev-master
, not released) something was changed in PHP tokenizer. That resulted in failing tests in my coding standard https://travis-ci.org/aik099/CodingStandard/jobs/109055550 in general and https://github.com/aik099/CodingStandard/blob/master/CodingStandard/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php sniff in particular.Currently I have no idea how to correlate PHP tokenizer changes to failing unit test in my standard.
The text was updated successfully, but these errors were encountered: