Closed dingo-d closed 5 years ago
This is a known issue in PHPCS - see: https://github.com/squizlabs/PHP_CodeSniffer/issues/1821 and https://github.com/squizlabs/PHP_CodeSniffer/issues/2197
Since PHPCS 3.3.0, you can, at least, overrule the testVersion
set in a ruleset by using the command line, which for now is the only solution (or use the hack described in 2197 above).
See: https://github.com/PHPCompatibility/PHPCompatibility#testversion-in-the-ruleset-versus-command-line
Oh, that's a shame. I'll wait for the fix then, thanks!
Hi!
I updated the companies ruleset to check the code against PHP 7.0 code and up, with
So in my project's
phpcs.xml.dist
I addedbecause I'm actually working on PHP 7.2, and I'm using things like typehinting a
void
return value of a method.The problem is that the config set in my project's ruleset is not overwritten and I'm getting errors like
Am I doing something wrong? This should be like any other rule for PHPCS.