Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ concurrency:

jobs:
mutation:
uses: yiisoft/actions/.github/workflows/roave-infection.yml@master
uses: yiisoft/actions/.github/workflows/infection.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.1']
infection-args: --ignore-msi-with-no-mutations
secrets:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.92.5",
"httpsoft/http-message": "^1.1.6",
"infection/infection": "^0.29.8 || ^0.35.8",
"phpunit/phpunit": "^10.5.51",
"psr/event-dispatcher": "^1.0",
"rector/rector": "^2.1.3",
"roave/infection-static-analysis-plugin": "^1.35",
"shipmonk/composer-dependency-analyser": "^1.8",
"spatie/phpunit-watcher": "^1.24",
"vimeo/psalm": "^5.26.1 || ^6.13.1",
Expand Down
5 changes: 2 additions & 3 deletions docs/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ The package is tested with [PHPUnit](https://phpunit.de/). To run tests:

## Mutation testing

The package tests are checked with [Infection](https://infection.github.io/) mutation framework with
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it:
The package tests are checked with [Infection](https://infection.github.io/) mutation framework. To run it:

```shell
./vendor/bin/roave-infection-static-analysis-plugin
./vendor/bin/infection

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Medium · Static-analysis mutation checks disappear

When a mutant introduces a static-analysis error that PHPUnit does not detect, the direct Infection command runs mutation tests but no longer runs the removed Roave static-analysis plugin, so mutants that introduce static-analysis errors without failing PHPUnit tests pass the mutation job.

Retain equivalent static-analysis checks for Infection mutants, or explicitly accept and document the reduced mutation coverage.

Also at composer.json:51.

Prompt for AI agents
In `docs/internals.md` at line 16:

**Static-analysis mutation checks disappear**

When a mutant introduces a static-analysis error that PHPUnit does not detect, the direct Infection command runs mutation tests but no longer runs the removed Roave static-analysis plugin, so mutants that introduce static-analysis errors without failing PHPUnit tests pass the mutation job.

Retain equivalent static-analysis checks for Infection mutants, or explicitly accept and document the reduced mutation coverage.

Also at `composer.json:51`.

```

## Static analysis
Expand Down
Loading