Source: juststeveking.uk

Running PHPStan on max with Laravel
Over the last few years static analysis in PHP, and more specifically Laravel, has become more and more popular. Up until this point I had struggled getting a good static analysis coverage in Laravel using https://phpstan.org/ or https://psalm.dev/. Larastans rules allowed me to start applying more static analysis to my code base, and in turn having a lot more confidence in my code.

Now if we run static analysis again, we should have gotten rid of those errors: composer phpstan Note: Using configuration file /Users/steve/code/sites/larastan-test/phpstan.neon.

What we do next is iterate through our application, making sure that we run our static analysis checks at important points.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners