Repository navigation
fix: declare the statuses() error key as nullable and make psalm pass - #24
Merged
Merged
Conversation
refactor: drop the redundant Status assertion in Manager::statuses() ci: run psalm on pushes to 2.x statuses() has always returned 'error' => null for a process without an error, while the docblock declared an optional key. ClassMustBeFinal is suppressed instead of making Exception\ServiceException final, which would break users extending it. Assisted-By: Claude Opus 5.5
|
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 was referenced Oct 9, 2026
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.
What was changed
Manager::statuses()docblock now declareserroras an always presentnull|array{...}key, matching what the method has always returned ('error' => nullfor a process without an error) instead of an optional key.ClassMustBeFinalis suppressed inpsalm.xml:Exception\ServiceExceptionstays extendable, so there is no BC break.assert()and an inline suppression instatuses()are gone; the psalm workflow runs on pushes to2.x('*.*'before) andpsalm.xmlis excluded from the dist archive.#[\Override]was needed: no method insrcoverrides or implements a parent one.Why?
Psalm 6 is red on
2.xwithClassMustBeFinalandRedundantConditionGivenDocblockType; with this PR it reports no errors.Checklist
vendor/bin/psalm(6.20) locally without ext-protobuf, PHP versions 8.2 and 8.3: no errors