Question

How to correctly test against MEQP2 standard?

Normally i use

vendor/bin/phpcs --standard=PSR2

To supress errors a i use this:

//phpcs:ignore

or

//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.

https://github.com/magento/marketplace-eqp/blob/c82070eca1075569578206430a6ef7975f7eeec1/composer.json#L8


What correct ...?

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

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top