Everything on Static Analysis.
4 articles tagged Static Analysis, sorted newest first.
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.
PHP 8.5 #[\NoDiscard]: Stop Silently Ignoring Return Values That Matter
PHP 8.5 ships a new #[\NoDiscard] attribute that warns when you forget to use a function's return value. Here is how to apply it to your own immutable builders — and why (void) is the only safe way to suppress it.
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.