Repository navigation
refactor: add #[\Override] and drop the psalm baseline - #64
Conversation
refactor: resolve the Psalm baseline in code ci: drop the psalm baseline and the MissingOverrideAttribute suppression The baseline entries are fixed with accurate docblocks, strict comparisons and typed option reads, without signature changes. Two suppressions stay: ClassMustBeFinal, since making public classes final would break BC, and the undefined $config in GetBinaryCommand::installConfig(), tracked in #62. Collection suppresses UnsafeGenericInstantiation because its constructor and all subclasses are final. Assisted-By: Claude Opus 5.5
ci: run psalm on pushes to 2.x with a read-only token The previous commit only removed psalm-baseline.xml; this one carries the code and config changes it describes. Assisted-By: Claude Opus 5.5
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (61)
💤 Files with no reviewable changes (3)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThis PR updates Psalm CI and configuration, removes the Psalm baseline, adds override attributes and type documentation across CLI, configuration, archive, and repository code, and adjusts checks for empty values, temporary directories, and extracted files. ChangesPsalm and PHP typing
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to No concrete regression is established in the reviewed changes, so the PR's merge risk is minimal, subject to normal CI checks. Pre-merge checks |
|
What was changed
#[\Override], and Psalm'sMissingOverrideAttributesuppression is gone.psalm-baseline.xmlis removed. Its 46 entries are fixed in code without signature changes: accurate docblocks (collections, GitHub API shapes, stability, config sections), strict comparisons instead of truthy checks, and typed reads of console options. Psalm is green at level 1 without a baseline.2.xwith a read-only token.Review notes
ClassMustBeFinalstays suppressed: making the public classes final would break BC for users who extend them.$configinGetBinaryCommand::installConfig()has an inline suppression pointing to .phar assets cannot be opened, and a failed config generation still writes .rr.yaml #62, so it is not fixed here.CollectionsuppressesUnsafeGenericInstantiation: its constructor and every subclass are final, sonew staticcannot break the item type.--presetoption and an emptyGITHUB_TOKEN/temp directory are now checked againstnull/''instead of truthiness. The only value treated differently is the string"0".Checklist
Summary by CodeRabbit
nullor an empty string are validated as directory paths.