DEV Community

Mario Tilli
Mario Tilli

Posted on

PHPStan

Recently I've heard and read about PHPStan: I would like to use it for my everyday PHP work because it seems powerful and useful

does anyone know or use it ?
Is it worth using it ?

Top comments (5)

Collapse
 
biros profile image
Boris Jamot ✊ /

I use it and it seems to be the most powerful quality tool in PHP world.
However, it's not so easy to use as phpcs & phpmd.
That's the reason why I didn't put it yet in my CI : it requires a bit more of configuration.
I still use it manually sometimes, like before a major release.

Collapse
 
bosepchuk profile image
Blaine Osepchuk

We're in almost the exact same situation in my workplace.

We use the built-in inspections provided by PhpStorm, plus the extended inspections plugin, plus phpmd, plus phpcs. All of these inspections run automatically and continuously in PhpStorm. And that's how we work day-to-day.

But we do use PhpStan for special circumstances (like when we upgraded our code from PHP 5.6).

If you're just getting started and already use or can adopt PhpStorm, I'd get all those other inspections running first. They will change your life.

Collapse
 
biros profile image
Boris Jamot ✊ /

I don't know if you saw it, but you may be interested by a series of articles about code quality in PHP that I wrote recently :

Collapse
 
mario_tilli profile image
Mario Tilli

Thank you all for your suggestions!

Collapse
 
matthewbdaly profile image
Matthew Daly

I started using it recently and I find it very helpful. The feedback it gives on my code quality is useful, and it's not too hard to set up.