[phpMyAdmin Developers] Trouble with phpcs?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[phpMyAdmin Developers] Trouble with phpcs?

Isaac Bennetch
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

_______________________________________________
Developers mailing list
[hidden email]
https://lists.phpmyadmin.net/mailman/listinfo/developers
Reply | Threaded
Open this post in threaded view
|

Re: [phpMyAdmin Developers] Trouble with phpcs?

Maurício Meneghini Fauth
Hello, Isaac.

I just ran phpcs here and found no problem.
Try deleting the vendor directory and run composer update.

Maurício Meneghini Fauth

On Thu, Aug 10, 2017 at 11:33 AM, Isaac Bennetch <[hidden email]> 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

_______________________________________________
Developers mailing list
[hidden email]
https://lists.phpmyadmin.net/mailman/listinfo/developers


_______________________________________________
Developers mailing list
[hidden email]
https://lists.phpmyadmin.net/mailman/listinfo/developers
Reply | Threaded
Open this post in threaded view
|

Re: [phpMyAdmin Developers] Trouble with phpcs?

Isaac Bennetch
On Thu, Aug 10, 2017 at 11:02 AM, Maurício Meneghini Fauth
<[hidden email]> 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 <[hidden email]> 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

_______________________________________________
Developers mailing list
[hidden email]
https://lists.phpmyadmin.net/mailman/listinfo/developers