HACKER Q&A
📣 jjice

Best PHP tools to improve code quality?


I've been working at a PHP shop for the last year. I think it's a fine language, but a lot of things I've grown to love from other languages aren't supported out of the box in PHP, like unused variable warnings.

I recently set up PHP CS Fixer for my team, and I'm in the process of setting of PHP Stan for our IDEs and CI. Are there any other tools that will seriously improve the quality of our code and provide better static analysis that we're missing at the moment? I've read about PHP MD, Psalm, Phan, and a few more, but I'm not sure which are just competitors of each other and which ones we'd benefit from having together.

We don't use a framework, by the way.


  👤 boraalparat Accepted Answer ✓
You can use static code checking tools like Vimeo/Psalm and Phpstan. These tools statically checks your code finds inconsistencies, and potential variable, class misuses.

Definitely you should check stitcher.io for recent developments as well as phptherightway.com

https://github.com/vimeo/psalm https://github.com/phpstan/phpstan