Skip to content

ci: add mutation testing with Infection - #49

Merged
roxblnfk merged 1 commit into
3.xfrom
ci/mutation-testing
Oct 9, 2026
Merged

roxblnfk merged 1 commit into
3.xfrom
ci/mutation-testing

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Oct 9, 2026

Copy link
Copy Markdown
Member

🔍 What was changed

  • New Mutation Tests workflow runs Infection over src with Testo on PRs and pushes to 3.x (PHP 8.4, Xdebug, --min-msi=70); on 3.x pushes it reports to the Stryker dashboard.
  • Mutation testing badge added to the README.

Review notes

  • Infection is installed via composer require inside the workflow, not via the Phar: in Infection 0.35.6 Phar the bundled testo/bridge-infection writes a mutant bootstrap calling \Infection\StreamWrapper\IncludeInterceptor, but the Phar scopes it as Infected\Infection\StreamWrapper\IncludeInterceptor, so every mutant fails with "class not found". The fix belongs in the bridge (use IncludeInterceptor::class in the template); then the workflow can switch to tools: infection.
  • Not in require-dev because Infection needs PHP >= 8.3 and the package supports 8.2.
  • STRYKER_DASHBOARD_API_KEY isn't visible to this repo yet (neither repo nor org secret), so the dashboard report and the badge stay empty until it is added.

Checklist

  • How was this tested:
    • Infection run locally: 117 mutants, 86 killed, 2 errors, MSI 75%, covered MSI 75%, mutation code coverage 100%

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7c1792f7-ff6d-4c59-a988-f402f7a2e2dd

📥 Commits

Reviewing files that changed from the base of the PR and between 0677fc3 and 758cec0.


📒 Files selected for processing (3)
  • .github/workflows/mutation.yml
  • README.md
  • infection.json5


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

Infection is installed in the workflow instead of require-dev: it needs PHP >= 8.3 while the package supports 8.2, and its Phar can't run Testo mutants yet (the bundled adapter's bootstrap references the unscoped `IncludeInterceptor` class).

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk force-pushed the ci/mutation-testing branch from 3f626c0 to 758cec0 Compare October 9, 2026 18:56
@roxblnfk
roxblnfk requested a review from a team as a code owner October 9, 2026 18:56
@roxblnfk
roxblnfk merged commit eeec76c into 3.x Oct 9, 2026
14 checks passed
@roxblnfk
roxblnfk deleted the ci/mutation-testing branch October 9, 2026 18:57
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