[phpMyAdmin Developers] Trouble with phpcs?

Isaac Bennetch bennetch at gmail.com
Tue Aug 15 01:54:46 CEST 2017


On Thu, Aug 10, 2017 at 11:02 AM, Maurício Meneghini Fauth
<mauriciofauth at gmail.com> wrote:
> Hello, Isaac.
>
> I just ran phpcs here and found no problem.
> Try deleting the vendor directory and run composer update.

Maurício, thanks for the response.

> Maurício Meneghini Fauth
>
> On Thu, Aug 10, 2017 at 11:33 AM, Isaac Bennetch <bennetch at gmail.com> wrote:
>>
>> I'm having trouble manually running phpcs on my system, has anyone
>> else tried lately? I haven't run it locally in some time and now I get
>> an error.
>>
>> All the Google results I've found for this error are for software
>> using phpcs that wasn't compatible with version 3, so it's tough for
>> me to tell offhand if this is something wrong with my system directly
>> or a version incompatibility.
>>
>> PHP Fatal error:  Interface 'PHP_CodeSniffer_Sniff' not found in
>>
>> /var/www/pma-dev/coding-standard/PMAStandard/Sniffs/Commenting/FunctionCommentSniff.php
>> on line 29
>> PHP Stack trace:
>> PHP   1. {main}() /usr/bin/phpcs:0
>> PHP   2. PHP_CodeSniffer\Runner->runPHPCS() /usr/bin/phpcs:18
>> PHP   3. PHP_CodeSniffer\Runner->init()
>> /usr/share/php/PHP/CodeSniffer/src/Runner.php:70
>> PHP   4. PHP_CodeSniffer\Ruleset->__construct()
>> /usr/share/php/PHP/CodeSniffer/src/Runner.php:294
>> PHP   5. PHP_CodeSniffer\Ruleset->registerSniffs()
>> /usr/share/php/PHP/CodeSniffer/src/Ruleset.php:206
>> PHP   6. PHP_CodeSniffer\Autoload::loadFile()
>> /usr/share/php/PHP/CodeSniffer/src/Ruleset.php:1094
>> PHP   7. include() /usr/share/php/PHP/CodeSniffer/autoload.php:167


Just to follow up with this,
it turns out I had another version of phpcs installed, from PEAR. It's
version 3.something
and was running instead of the one in my phpMyAdmin vendor directory.

We already have an existing issue[1] about upgrading the ruleset, so
this is just a local configuration
issue I ran in to.

Thanks

 1 - https://github.com/phpmyadmin/coding-standard/issues/3



More information about the Developers mailing list