test: add mutation testing with Infection PHP #75

Open
Charon wants to merge 2 commits from feat/add-infection-mutation-testing into dev
Member

Fixes #34

Changes

  • Add infection/infection ^0.29 to require-dev
  • Create infection.json5 config targeting all source directories (mirrors phpstan.neon paths)
  • Add composer mutate script (infection --show-mutations --threads=max)
  • Allow infection/extension-installer plugin
  • Update .gitignore for Infection output files (.infection/, infection.log, infection-summary.log)

Configuration

  • Test framework: Pest
  • Source dirs: All 20 package directories (Concerns, Console, Controllers, Services, etc.)
  • Excluded: Database/Factories, Database/Seeders
  • minMsi: 50% (mutation score indicator)
  • minCoveredMsi: 70% (covered code MSI)
  • Mutators: @default set
  • Timeout: 30s per mutant
Fixes #34 ## Changes - Add `infection/infection` ^0.29 to `require-dev` - Create `infection.json5` config targeting all source directories (mirrors phpstan.neon paths) - Add `composer mutate` script (`infection --show-mutations --threads=max`) - Allow `infection/extension-installer` plugin - Update `.gitignore` for Infection output files (`.infection/`, `infection.log`, `infection-summary.log`) ## Configuration - **Test framework:** Pest - **Source dirs:** All 20 package directories (Concerns, Console, Controllers, Services, etc.) - **Excluded:** Database/Factories, Database/Seeders - **minMsi:** 50% (mutation score indicator) - **minCoveredMsi:** 70% (covered code MSI) - **Mutators:** @default set - **Timeout:** 30s per mutant
Charon added 2 commits 2026-03-24 13:49:42 +00:00
Add larastan/larastan ^3.0 to require-dev and create phpstan.neon
config at level 5 covering all source directories. Adds a
`composer analyse` script shortcut.

Fixes #26

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add infection/infection ^0.29 to require-dev
- Create infection.json5 with sensible defaults matching phpstan source dirs
- Add composer mutate script for running mutation tests
- Add infection/extension-installer to allowed plugins
- Update .gitignore for infection output files

Fixes #34

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/add-infection-mutation-testing:feat/add-infection-mutation-testing
git checkout feat/add-infection-mutation-testing

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout dev
git merge --no-ff feat/add-infection-mutation-testing
git checkout feat/add-infection-mutation-testing
git rebase dev
git checkout dev
git merge --ff-only feat/add-infection-mutation-testing
git checkout feat/add-infection-mutation-testing
git rebase dev
git checkout dev
git merge --no-ff feat/add-infection-mutation-testing
git checkout dev
git merge --squash feat/add-infection-mutation-testing
git checkout dev
git merge --ff-only feat/add-infection-mutation-testing
git checkout dev
git merge feat/add-infection-mutation-testing
git push origin dev
Sign in to join this conversation.
No description provided.