Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Oct 18, 2025

@staabm staabm marked this pull request as ready for review October 19, 2025 18:16
- name: "PHPStan"
run: "make phpstan"

- uses: "actions/upload-artifact@v4"
Copy link
Contributor Author

@staabm staabm Oct 25, 2025

Choose a reason for hiding this comment

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

instead of uploading/downloading artifacts for caching, I changed to use actions/cache because that way it also works on phpstan-src. special in phpstan-src is that the "static-analysis" and "test" jobs are spread across 2 workflows, which makes artifact handling otherwise complicated

- name: "Configure mutators"
run: |
php build-infection/bin/infection-config.php \
--mutator-class='PHPStan\Infection\TrinaryLogicMutator' \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

here we can configure the used mutators by just appending
--mutator-class='PHPStan\Infection\TrinaryLogicMutator' \
as often as required

Copy link
Member

Choose a reason for hiding this comment

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

I'd like the list to be just in build-infection. I don't expect different projects to need different mutators.

Comment on lines 196 to 197
- name: "Configure mutators"
run: cp build-infection/resources/infection.json5 .
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, here we take the config 1:1 from build-infection

Copy link
Member

Choose a reason for hiding this comment

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

Just FYI in phpstan-src I'll also want to add https://github.com/phpstan/phpstan-src/tree/2.1.x/build/PHPStan/Build because there are some tests for that in https://github.com/phpstan/phpstan-src/tree/2.1.x/tests/PHPStan/Build.

So if we're copying the whole config I'd still like to be able to modify it afterward.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added a --source-directory='another/path' option

Comment on lines 196 to 197
- name: "Configure mutators"
run: cp build-infection/resources/infection.json5 .
Copy link
Member

Choose a reason for hiding this comment

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

Just FYI in phpstan-src I'll also want to add https://github.com/phpstan/phpstan-src/tree/2.1.x/build/PHPStan/Build because there are some tests for that in https://github.com/phpstan/phpstan-src/tree/2.1.x/tests/PHPStan/Build.

So if we're copying the whole config I'd still like to be able to modify it afterward.

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.

Integrate into phpstan-doctrine

2 participants