Adopt phpstan on legacy code with a baseline

Turning on phpstan for an old codebase produces hundreds of errors on day one. Record them in a baseline file, so the build only fails on new problems, then fix them over time.

vendor/bin/phpstan analyse --generate-baseline

Include phpstan-baseline.neon in your config. New code has to be clean, and the baseline shrinks as you fix old errors.

Vishwas Bhatnagar

More quick notes

More