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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners