A baseline lets a project adopt a level today and fix the existing violations over time, and it becomes a lie the moment it is allowed to grow.
parameters:
level: 8
paths: [app, src]
includes:
- phpstan-baseline.neon
# and the rule that makes it honest, in CI:
# the baseline file's line count must never increase.
# new code is analysed at level 8 with no exceptions.
$ wc -l phpstan-baseline.neon # tracked, per week
Regenerating the baseline to make the build pass is the failure, and it is indistinguishable from a legitimate regeneration unless the count is checked. Plotting the number over time turns the debt into something visible in a review rather than a file nobody opens. Reviewing baseline changes in a pull request is the other half — a diff that adds entries deserves a question every time.