-
Notifications
You must be signed in to change notification settings - Fork 38
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
False Positive: Vantage #275
Comments
@AlexGStapleton I've ran some tests with the underlying tooling (PHPCompatibility) and for the life of me, I can not reproduce these results at all. I've tested with the current version as well as numerous older versions as far back as releases from 2017 and still can not reproduce this. I'd be curious to know what version of the plugin you are using and on which version of PHP the setup is being run. Either way, I suspect this is either a problem with a severely out of date plugin or a problem within this plugin itself. Once I know the plugin version and the PHP version used, I can run a last test to confirm. |
We've had trouble getting the plugin to not timeout when checking Vantage (and our other plugins) so we had to rely on the users install which was able to reliably run the tests without it timing out. The plugin version they have installed is 1.5.0, and the PHP version they're currently using is 7.1.14. The tests were run against PHP 7.3. We had another user report the same results and they were using PHP 7.2.22 - unsure of the plugin version or what version they were testing against. |
@AlexGStapleton Thanks for that information. I've now able to reproduce the issue with:
The problem is a bug in PHPCS itself which doesn't exist in any of the more recent PHPCS versions (tested with 3.02 and up) and which external standards cannot work-around as the token information provided by PHPCS is basically wrong (in certain circumstances). In other words: the solution is for the plugin to upgrade the PHPCS version used. PHPCS 2.9.2 was released in November 2018 as a afterthought as PHPCS 3.0.0 was already released in May 2017 and the current version is 3.5.5 (April 2020), so the PHPCS version used by the plugin is sorely out of date. The bug is triggered because the code in the file uses inline control structures without braces: if(!empty($icon_styles)) echo ' icon-color-set' So, in the mean time, if you want to prevent further notices from your users: use braces with your control structures. |
@jrfnl Using the provided feedback I was able to get Vantage to pass. Thanks for helping out with this, we really appreciate it. :) |
@jrfnl I'm unsure if you want to use this issue for tracking the PHPCS issue or not so I'm going to reopen it. Please feel free to close or adjust accordingly. |
@AlexGStapleton Nothing for me to keep track of. Maybe for one of the plugin maintainers though, For your perspective: I'm not directly involved with this project. I am the maintainer of the underlying tooling and there's nothing I can do there for this issue ;-) |
Related Vantage Issue
File
PHP Compatability Checker isn't detecting classes and incorrectly flagging code as a result of this. If we're doing something wrong by modern standards we would be more than happy to update our code.
The text was updated successfully, but these errors were encountered: