Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: split phpstan-baseline into smaller files #9299

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

paulbalandan
Copy link
Member

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:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan paulbalandan marked this pull request as draft December 2, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant