PHPCS fatal execution error occurred

What causes the phpcs fatal execution error? Is there something wrong with how you installed PHP Code Sniffer? Perhaps there is something wrong with VSCode or the coding standard you are trying to implement.

Initially, I thought there was something wrong with my VSCode extension, I actually kept searching for things such as “vscode fatal execution”, “PHP sniffer fatal execution”, and a lot more that didn’t really help. How did I finally fix it?

If your problem is anything like mine, here’s the solution:

Downgrade your version of PHP.

My research (googling) on this subject led me to this GitHub issue. Basically, that page outlines that, at the time of writing, the WordPress Coding Standards were not ready for PHP 8, which is exactly what I was running on my machine.

So I went ahead and downgraded from PHP 8.1 to PHP 7.4 and voila! Problem solved. 🙂

I use Homebrew on my Mac and found the following article about downgrading PHP very much on point.

I hope this helps!

Use this link to check out more quick fixes from my blog. 💻

Leave a Comment

Your email address will not be published. Required fields are marked *