4
17:18   PHP Code Sniffer
        No response from /home/my_user/.composer/vendor/squizlabs/php_codesniffer/bin/phpcs after 5000 ms
        Disable inspection

Any idea? I've tried a lot of solutions like disable xdebug, increment response time.

It does not work in PhpStorm but works in the terminal.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Juan Wilde
  • 134
  • 1
  • 5

1 Answers1

6

I looked into this problem today and it is caused by a change to the STDIN processing code for PHPCS 3.2.0. I don't know exactly why it looks like STDIN has content but nothing is coming through, but that's what PHPCS sees and so it waits forever. PHPStorm times out after 5 seconds (I think it is, by default).

I've pushed up a change to PHPCS to enforce a short time-out on STDIN and tested this change with PHPStorm, which is now working for me.

If you can use the current master branch for PHPCS, it should work ok. If not, reverting back to 3.1.1 (or earlier) is all you can do until 3.2.1 is released. I'm not sure when that will be just yet.

Greg Sherwood
  • 6,992
  • 2
  • 29
  • 24