Skip to content

refactor: fix psalm 6 issues - #21

Merged
roxblnfk merged 1 commit into
1.xfrom
static-analysis
Oct 9, 2026
Merged

roxblnfk merged 1 commit into
1.xfrom
static-analysis

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Oct 9, 2026

Copy link
Copy Markdown
Member
Q A
Bugfix? ❌
Breaks BC? ❌
New feature? ❌
Issues —
Docs PR —

Psalm 6 (errorLevel=1) is now green. Every issue is fixed in code; nothing is suppressed except ClassMustBeFinal.

  • #[\Override] on every method that implements an interface. PHP 8.2 ignores the attribute, so no polyfill.
  • !empty() checks on ?non-empty-string are now strict null checks (Installed, VersionChecker). The result of preg_match() is checked directly.
  • Package skips a composer.json it cannot read instead of passing false to json_decode().
  • ProcessInterface::exec() documents $command as array<string>, matching what Symfony Process expects.
  • ClassMustBeFinal is disabled in psalm.xml, since making public classes final would break BC. The unused UndefinedAttributeClass suppression for JetBrains ExpectedValues is removed.

Review notes

  • The VersionChecker::greaterThan() docblock widens from non-empty-string|null to string|null, because the method has always treated '' like null. The one difference from empty(): '0' is now passed through as a version instead of falling back to the required version.

  • How was this tested:

    • Psalm passes locally with --php-version=8.2 and 8.3
    • Testo suite passes locally (119/119)

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>
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7a358a5c-797b-4011-9521-c967c94663f9

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@roxblnfk
roxblnfk merged commit a805e3f into 1.x Oct 9, 2026
14 checks passed
@roxblnfk
roxblnfk deleted the static-analysis branch October 9, 2026 16:59
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