Everything on phpstan.
4 articles tagged phpstan, sorted newest first.
Write a Custom PHPStan Rule to Enforce Your Laravel Conventions
Some conventions live only in reviewers' heads, so they rot. A PHPStan custom rule moves one of them into CI permanently — here is the whole build, including the test.
Adopt a PHPStan Baseline on a Legacy Laravel App (and Burn It Down)
A first PHPStan run on an old Laravel app reports thousands of errors. Here's how to baseline that debt, hold new code to the full ruleset, and reduce it deliberately.
PestStan — Type-Safe Pest 4 Tests With PHPStan Generics in a Laravel App
PestStan teaches PHPStan about Pest's globals — generic expect() types, proper $this binding, and rules that catch broken assertions before the test even runs.
PHPStan Level 10 in Laravel: Fix the 5 Most Common Errors
Bumped Larastan to level 10 and got 300 new errors? Here are the five patterns you'll see again and again: and the exact fix for each.