Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I just updated PHP_CodeSniffer to the latest 2.0.0 version released 2014-12-05 03:55 UTC
http://pear.php.net/package/PHP_CodeSniffer/download
I use it in PHPStorm 8 as an Inspector. it now thows the error
PHP Code Sniffer
phpcs: PHP Fatal error: Access level to Drupal_Sniffs_Functions_DiscouragedFunctionsSniff::$forbiddenFunctions must be public (as in class Generic_Sniffs_PHP_ForbiddenFunctionsSniff) in /home/jowan/coder/coder_sniffer/Drupal/Sniffs/Functions/DiscouragedFunctionsSniff.php on line 20
where as previous versions work ok. I'm using 2.0.0RC1 at the moment ad it sniffs fine.
Is there something in my configuration that could be wrong (Pear version ? IDE set up ? etc) or is it just an incompatible version at present.
Thanks.
Comments
Comment #1
8bitplateau CreditAttribution: 8bitplateau commentedComment #2
klausiPHPCS 2.0 is only compatible with Coder 8.x-2.x. Please use Coder 8.x-2.x which can also be used to check D7 code.