0

Problem

PHP_CodeSniffer runs fine in my console, but gives me problems when I try to use it in PhpStorm. In should give me warnings about violations when I'm working in the editor. Currently it just returns phpcs: exit status 1 and phpcs: exit status 2 in the event log.

Here is a screenshot that illustrates the problem. And this is a link to a blog post from PhpStorm of how it should work.

What I've tried

I reinstalled the latest version of PHP_CodeSniffer globally and reconfigured the tool in my PhpStorm preferences without any luck.

Question

What can I do to make PHP_CodeSniffer work again by showing me helpful warnings instead of returning exit status codes in the event log?

  • 1) what server type do you have at File | Settings | Languages & Frameworks | PHP 2) can you successfully validate php_codesniffer at File | Settings | Languages & Frameworks | PHP | Quality Tools? 3) I would suggest to contact PhpStorm support directly to troubleshoot IDE configuration issues using Help | Contact Support – Dmitrii Jan 30 '20 at 14:03
  • Thanks for your questions! I unfortunately can't find any server type under Languages & Frameworks > PHP. I can indeed successfully validate php_codesniffer. – Stefano Degenkamp Feb 04 '20 at 08:56
  • I mean: is it a local PHP server or a remote, Docker, vagrant? – Dmitrii Feb 04 '20 at 11:16
  • I'm using a local Symfony server via Docker. – Stefano Degenkamp Feb 04 '20 at 13:16
  • Well, that's a lot of stuff to check then. I suggest to contact PhpStorm support directly via Help | Contact Support - it would be more convenient to share logs, screenshots & sensitive data that way. First of all a log (Help > Show log in ...) should be checked for any detailed messages. Then, a configuration of phpcs should be checked. – Dmitrii Feb 04 '20 at 18:41
  • Thank you, I will! – Stefano Degenkamp Feb 05 '20 at 11:07

0 Answers0