Skip to content

Raise vimeo/psalm to ^7.0 - #178

Merged
rasuvaeff merged 1 commit into
masterfrom
chore/psalm-7
Nov 11, 2026
Merged

rasuvaeff merged 1 commit into
masterfrom
chore/psalm-7

Conversation

@rasuvaeff

@rasuvaeff rasuvaeff commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Part of the Psalm 7 rollout (final library batch). Constraint ^6.16 → ^7.0, single major. composer build green locally on Psalm 7.3.0.

Summary by Sourcery

Enhancements:

  • Upgrade the project’s Psalm dependency to version 7 and adjust static-analysis handling for DrawnEngine’s intentional mutable state.

Downgrade ImmutableDependency to info for DrawnEngine: \Random\Engine::generate
has the narrow stub contract (read-props|write-this-props|io), but the draw tape
is static state and shrinking builds exceptions — the implementation honestly
does more than the stub allows and cannot fit it without losing the tape.
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Important

  • Trigger review

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

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a8594466-b19d-4568-b442-88c88bd34d8e
  • 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

@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Review the DrawnEngine-specific Psalm issue-level downgrade alongside the explanation for why its static tape and exception construction exceed the Random Engine stub contract.

  • psalm.xml L18-30

Configuration

Review the Psalm dependency major-version constraint change as part of the Psalm 7 rollout.

  • composer.json L42

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="psalm.xml" line_range="26" />
<code_context>
+             The implementation cannot fit the interface contract without
+             losing the tape; downgraded to info for this file only. -->
+        <ImmutableDependency>
+            <errorLevel type="info">
+                <file name="src/Arbitrary/DrawnEngine.php"/>
+            </errorLevel>
</code_context>
<issue_to_address>
**Psalm misses a contract violation**

When psalm analyzes `src/Arbitrary/DrawnEngine.php`, psalm demotes `DrawnEngine`’s `ImmutableDependency` finding to info instead of resolving the effect-contract mismatch, so `composer build` passes with the finding still present.

Resolve the effect-contract mismatch at its source and remove the file-scoped issue-handler downgrade.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: psalm.xml:26


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread psalm.xml Resolved
@rasuvaeff
rasuvaeff merged commit 5dd3bdc into master Nov 11, 2026
16 checks passed
@rasuvaeff
rasuvaeff deleted the chore/psalm-7 branch November 11, 2026 19:56
@rasuvaeff

Copy link
Copy Markdown
Owner Author

Note on the Sourcery thread (resolved): the ImmutableDependency downgrade for DrawnEngine cannot be fixed at the source — \\Random\\Engine::generate carries the stub contract read-props|write-this-props|io from PHP itself, and an override may only need FEWER capabilities than the interface it implements. The draw tape is static state and shrink builds exceptions, so the implementation honestly exceeds the stub. This is the sanctioned last-resort case for a file-scoped issueHandler (root AGENTS.md), documented in the psalm.xml comment and docs/psalm-7-rollout.md; the finding stays visible as info.

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