-
Notifications
You must be signed in to change notification settings - Fork 136
Try phpstan-mutant-killer-infection-runner #1505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.59.x
Are you sure you want to change the base?
Changes from all commits
88b0136
305a109
58b8301
4966d4b
cf755c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,6 +184,60 @@ jobs: | |
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} | ||
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | ||
|
||
mutation-tests-phpstan: | ||
name: "Mutation tests with PHPStan" | ||
|
||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
matrix: | ||
dependencies: | ||
- "locked" | ||
php-version: | ||
- "8.4" | ||
operating-system: | ||
- "ubuntu-latest" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/[email protected]" | ||
with: | ||
coverage: "xdebug" | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: intl, sodium | ||
ini-values: memory_limit=-1, zend.assertions=1 | ||
|
||
- name: "Install dependencies" | ||
uses: "ramsey/[email protected]" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
|
||
- name: "Install CI dependencies" | ||
uses: "ramsey/[email protected]" | ||
with: | ||
dependency-versions: "${{ matrix.dependencies }}" | ||
working-directory: "tools" | ||
custom-cache-suffix: "ci" | ||
|
||
- name: "Warmup PHPStan" | ||
run: "tools/vendor/bin/phpstan analyse --memory-limit=-1" | ||
|
||
- name: "Infection" | ||
run: "tools/vendor/bin/phpstan-mutant-killer-infection-runner --phpstan-config phpstan.neon --log log.txt --threads=$(nproc)" | ||
env: | ||
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }} | ||
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: log.txt | ||
path: log.txt | ||
if-no-files-found: error | ||
|
||
compatibility: | ||
name: "Test Compatibility" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ | |
"phpstan/phpstan-phpunit": "^2.0.6", | ||
"vimeo/psalm": "^6.11.0", | ||
"roave/backward-compatibility-check": "^8.13.0", | ||
"roave/infection-static-analysis-plugin": "^1.37.0" | ||
"roave/infection-static-analysis-plugin": "^1.38.0", | ||
"phpstan/mutant-killer-infection-runner": "1.0.x-dev" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding a note here: let's get a stable (even if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not probably going to release this package, there's a bug that causes PHPStan not be called for some mutants and I don't know why. I talked to Maks at PHPers over the weekend and the official support in Infection should land very soon. We will continue working on this, mostly for performance improvements, but there's no reason to delay the feature in Infection itself. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. offtop:
confirm, I do my best on bringing it to Infection natively, I think by the end of the week or early next week we will have at least opened PR with draft implementation. Unfortunately, to support static analysis, I have to prepare other things to allow proper parallelization of PHPStan processes, so some architecture changes are required on Infection side first, thus it's not quick. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Just to be clear: nobody is chasing anybody :-) What matters most is that there's a plan 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. UPD: #1510 |
||
}, | ||
"config": { | ||
"allow-plugins": { | ||
|
@@ -20,5 +21,7 @@ | |
"psr-4": { | ||
"Roave\\BetterReflection\\": "../src" | ||
} | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can possibly disable the entire mutator? It will always catch optimizations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(unless there's a way to declare these optimizations at type level, perhaps?)