Repository navigation
refactor: fix psalm 6 issues - #21
Merged
Merged
Conversation
The issues are fixed in code rather than suppressed. ClassMustBeFinal is disabled in psalm.xml: making public classes final would break BC. The JetBrains ExpectedValues suppression is dropped because nothing uses that attribute any more. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Psalm 6 (
errorLevel=1) is now green. Every issue is fixed in code; nothing is suppressed exceptClassMustBeFinal.#[\Override]on every method that implements an interface. PHP 8.2 ignores the attribute, so no polyfill.!empty()checks on?non-empty-stringare now strict null checks (Installed,VersionChecker). The result ofpreg_match()is checked directly.Packageskips acomposer.jsonit cannot read instead of passingfalsetojson_decode().ProcessInterface::exec()documents$commandasarray<string>, matching what Symfony Process expects.ClassMustBeFinalis disabled inpsalm.xml, since making public classes final would break BC. The unusedUndefinedAttributeClasssuppression for JetBrainsExpectedValuesis removed.Review notes
The
VersionChecker::greaterThan()docblock widens fromnon-empty-string|nulltostring|null, because the method has always treated''likenull. The one difference fromempty():'0'is now passed through as a version instead of falling back to the required version.How was this tested:
--php-version=8.2and8.3