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

Copy link
Contributor Author

@staabm staabm Oct 26, 2025

Choose a reason for hiding this comment

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

hmm I think whether it would make sense to move this phpstan-src/build/PHPStan/Build rules into a separate repo, as this might make sense to be re-used in 1st party extension repos?

Copy link
Member

Choose a reason for hiding this comment

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

They're not relevant like that yet, mostly because phpstan-src can use PHP 8+ features thanks to downgrading and the extensions can't.

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.

@ondrejmirtes ondrejmirtes merged commit 8fe637e into phpstan:2.0.x Oct 26, 2025
39 of 40 checks passed
@staabm staabm deleted the infec branch October 26, 2025 08:15
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