Open aik099 opened 9 years ago
Hi,
Any update on this?
@schmittjoh , please update PHP_CodeSniffer version.
We have updated to 2.2 sometime last week. This should be solved now.
@schmittjoh Exactly. The update seems to broke our builds on Scrutinizer (1). Is there any configuration to specify which version to use??
@D-storm, unfortunately, not at the moment; maybe @aik099 has a pointer on what is going on there?
We are using our custom standard (PMAStandard) which is not supported by PHPCS v2.x as they removed Comment Parser from v2.x which was present in v1.5.x. Anyways, Thanks for the quick response.
Exactly. People using custom standards, that was written PHP_CodeSniffer 1.5 only features (e.g. DocBlock parser) are not guaranteed to work on PHP_CodeSniffer 2.2. That's why an option would be better to allow these projects to migrate their standard to PHPCodeSniffer 2.2 at time of their choosing.
How hard is it to upgrade to the newer version? At the moment, this seems to only affect very few projects.
How hard is it to upgrade to the newer version?
Not hard at all. @gsherwood provided assistance to everybody who were required to migrate their standard to work on PHPCS 2.0 three months before PHPCS 2.0 was ever released.
@D-storm The old comment parser was replaced by a new comment tokenizer, which is more flexible and far more reliable, but very different. There are examples in the repo of old and new sniffs to show the sort of changes required, and a little more info here (including links to example sniffs): https://www.squizlabs.com/php-codesniffer/2.0.0a1-released
I'm not sure who maintains that standard, but they can get in touch if they need some help converting over those sniffs and/or writing auto-fixes for custom sniffs. The commenting sniffs in there look like copy/paste from the included ones for the most part, so should be possible to upgrade them.
I guess this is where standard code lives https://github.com/phpmyadmin/phpmyadmin/tree/master/PMAStandard/, because ticket author just mentioned standard name.
@aik099, @schmittjoh, @gsherwood Thanks. We are migrating our standard to work on PHPCS 2.0,
I belive, that Scrutinizer CI is using PHP_CodeSniffer 1.5.x version, but I can't really proove that from the logs: https://scrutinizer-ci.com/g/qa-tools/qa-tools/inspections/d3ab63c4-666c-427a-8d62-628dcf81bd0f/log
Please either upgrade used PHP_CodeSniffer version to 2.0.0 or at least allow on per-project basis to specify version of PHP_CodeSniffer to use.