refactor: split phpstan-baseline into smaller files #9299
+15,407
−18,275
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR splits our existing enormous
phpstan-baseline.php
into smaller baseline files named by their identifiers, thanks to https://github.com/shipmonk-rnd/phpstan-baseline-per-identifier/tree/2.0.0. Currently, the baseline contains 3,741 errors. That's very overwhelming to fix. TBH, when looking at the baseline I cannot continue further because of the bulk of technical debt we have.The pro of this approach is that we can attack the baseline by identifier, making the cleanup less overwhelming. The cleanup would be bite-sized. The con of this approach is that we have too many baselines now, but that is the consequence of having 3.7k+ errors.
Same command to generate the baseline:
composer phpstan:baseline
P.S I have fixed some of the files as PHPStan complains of
No error to ignore
stuff.Checklist: