05: Static analysis in CI - #5
Open
nikolaystrikhar wants to merge 4 commits into
Open
Conversation
- --ignore-platform-reqs also disabled the config.platform.php pin, which resolved dev dependencies requiring PHP 8.1+; waive only the ext-* requirements a static-analysis run genuinely has no use for. - Run on 7.4, the floor the pin already targets, instead of an EOL 8.0 that matches neither end of the test matrix. - Fail when src/ holds no PHP files: PHPStan 1.x exits 0 on nothing to analyse, so a moved source root would leave the check green forever. - Narrow the token, cancel superseded PR runs, and cap the job, matching the tests workflow. - Drop reportUnmatchedIgnoredErrors: false; with no ignores yet it does nothing except guarantee the first stale one never gets reported. - Key the cache off head_ref, which is a branch name on pull_request.
Level 5 left coverage unused: the package analyses clean at 6, and 7 and 8 report the same single error, so 8 costs nothing beyond it. Level 9 is not taken -- its five findings are all in Sub_Plugin's untyped config reads, which are the runtime guards treatPhpDocTypesAsCertain: false exists to keep.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PHPStan over
src/, plus the workflow that runs it.Stacked on #4 — this PR's diff is the two new files.
Sub_Plugin's untyped config reads, which are the runtime guardstreatPhpDocTypesAsCertain: falseexists to keep.