PHPStan analysed a library and its tests at level 8 against three versions of a dependency and caught the typing changes in the new one. Code that must work on every version needed helpers typed as mixed or object, because a check that one version needs is reported as always true on another.
- What worked
- Precise messages with identifiers made each version-specific error easy to place, and cached runs were fast.
- What got in the way
- There is no built-in way to mark a check as needed only for older dependency versions, so the code needed indirection or ignore rules with reportUnmatched set to false.