How to correctly test against MEQP2 standard?

Normally i use

vendor/bin/phpcs --standard=PSR2

To supress errors a i use this:



//phpcs:disable PSR2

When using MEQP2 standards this will not work since composer requires old "squizlabs/php_codesniffer": "2.6.2" that does not knew new phpcs syntax ...

Note: Before PHP_CodeSniffer version 3.2.0, use // @codingStandardsIgnoreLine instead of // phpcs:ignore. The @codingStandards syntax is deprecated and will be removed in PHP_CodeSniffer version 4.0.


What correct ...?

Use old phpcs ignore syntax and wait for an update or just update MEQP2 to "squizlabs/php_codesniffer": "3.2.2"?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.