Skip to content

Replace Psalm with PHPStan - #90

Merged
vjik merged 2 commits into
masterfrom
phpstan
Nov 25, 2026
Merged

vjik merged 2 commits into
masterfrom
phpstan

Conversation

@vjik

@vjik vjik commented Nov 25, 2026 •

Copy link
Copy Markdown
Member
Q A
Is bugfix? ❌
New feature? ❌
Breaks BC? ❌

Summary by Sourcery

Replace Psalm with PHPStan for project static analysis.

Enhancements:

  • Replace Psalm with PHPStan as the project's static analysis tool and update annotations, configuration, scripts, CI, and documentation accordingly.

Build:

  • Add PHPStan as a development dependency and expose it through the Composer scripts.

CI:

  • Switch the static analysis workflow from Psalm to PHPStan and update its triggering paths.

Documentation:

  • Update static analysis instructions and remove the obsolete type-coverage badge.

Chores:

  • Remove Psalm configuration and tooling files.

@sourcery-ai

sourcery-ai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Sorry @vjik, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 22 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Update MessageSource’s type annotations to PHPStan-compatible PHPDoc and remove Psalm-specific suppressions while retaining its validation logic.

  • src/MessageSource.php L23-133 (8 small edits)

Configuration

Replace Psalm with PHPStan in the static-analysis workflow and configure PHPStan as the project’s development tool.

  • .github/workflows/static.yml L7, L22-23
  • composer.json L38, L72
  • phpstan.neon L1-5
  • psalm.xml (deleted)
  • tools/psalm/composer.json (deleted)

Documentation

Update project documentation and changelog to describe the PHPStan migration and remove the obsolete type-coverage badge.

  • CHANGELOG.md L5
  • docs/internals.md L22-25
  • README.md L15 (removed lines)

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

# Conflicts:
#	.github/workflows/bc.yml
#	.github/workflows/build.yml
#	.github/workflows/composer-require-checker.yml
#	.github/workflows/mutation.yml
#	.github/workflows/rector.yml
#	.github/workflows/static.yml
#	composer.json

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

Sourcery assessment

Approved.

@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (eb5036a) to head (7a7d7c4).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master       #90   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity        25        25           
===========================================
  Files              1         1           
  Lines             58        58           
===========================================
  Hits              58        58           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vjik
vjik merged commit 9a98f23 into master Nov 25, 2026
35 checks passed
@vjik
vjik deleted the phpstan branch November 25, 2026 11:05
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