yiisoft / yii2-coding-standards

Yii 2 coding standards
182 stars 49 forks source link

Please update to enable CodeSniffer v3 #34

Closed axtho closed 6 years ago

axtho commented 7 years ago

Currently it breaks your implementation:

HP Fatal error: Interface 'PHP_CodeSniffer_Sniff' not found in ./vendor/yiisoft/yii2-coding-standards/Yii2/Sniffs/Files/SpacesAroundConcatSniff.php on line 13

https://github.com/squizlabs/PHP_CodeSniffer/wiki/Version-3.0-Upgrade-Guide Maybe up that to another version so that the v2.x implementations of CodeSniffer still work?

krukru commented 7 years ago

I have an open PR #32 that addresses this issue. For now (until the code gets migrated) I think it would be best to clamp the version in composer.json to "squizlabs/php_codesniffer": ">=2.3.1 <3.0"

davidmpaz commented 6 years ago

What is the status of this? Is the PR merged?

samdark commented 6 years ago

No. It is not. The version is fixed so codesniffer can't update to v3.

davidmpaz commented 6 years ago

Got it. Thanks

biaoqianwo commented 6 years ago

I hope Official to upgrade to support PHPCodeSniffer v3 too.

urosgruber commented 6 years ago

Can this get merged or project is not maintained anymore?

samdark commented 6 years ago

@urosgruber the pull request is w/ issues so wasn't merged. Do you want to fix it and test it properly? Then we'll merge.

urosgruber commented 6 years ago

I was asking because we're looking to use Codeclimate integration. It's still only for v2 mostly because of plugins not being upgraded to v3. Also I'm on Symfony so I would spend to much time properly fixing this plugin and testing it as I'm not familiar with yii framework.

samdark commented 6 years ago

Well, can't merge a solution with known issues.

urosgruber commented 6 years ago

I understand. Just needed confirmation about the status of this so we know how to proceed

samdark commented 6 years ago

https://github.com/yiisoft/yii2-coding-standards/pull/37