Martin Hujer published a write-up on how he uses PHPStan to a full extent in a real-world application that combines Symfony Framework with Doctrine ORM and is tested by PHPUnit.

The benefits are clear — if you make PHPStan understand the code that uses a framework with its own conventions, you get additional type safety and discover more bugs this way.

He included all the configuration files you need to make PHPStan sing (and fly!). Check out the article on Martin’s blog:

Ondřej Mirtes

Author of PHPStan, static analysis tool for finding bugs in code without running it.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store