Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Oct 25, 2025

@ondrejmirtes
Copy link
Member

AFAIK the usage of build-infection isn't yet merged in phpstan-doctrine? I'd finish it there first before doing other repos.

@staabm
Copy link
Contributor Author

staabm commented Oct 25, 2025

AFAIK the usage of build-infection isn't yet merged in phpstan-doctrine?

yes, its waiting in phpstan/phpstan-doctrine#699 for the merge.

@staabm staabm marked this pull request as ready for review October 26, 2025 18:20
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

mutation-testing:
name: "Mutation Testing"
runs-on: "ubuntu-latest"
needs: ["tests", "tests-levels"]
Copy link
Member

Choose a reason for hiding this comment

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

tests-levels? I don't want Infection to run these levels so it doesn't make sense to wait for them.

Copy link
Member

Choose a reason for hiding this comment

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

Also: what about static analysis? I know it's in another workflow but not warmed-up cache might have a downside or two here?

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.

tests-levels? I don't want Infection to run these levels so it doesn't make sense to wait for them.

I initially added levels to make sure we run late enough for the static analysis step... does no longer make sense as we no longer have the artifact down/upload step.

deleted it.

Also: what about static analysis? I know it's in another workflow but not warmed-up cache might have a downside or two here?

as we restore the previous cache I think it will be "fresh enough". waiting across workflows will complicate it, as this is only supported in github actions with work-arrounds. I don't think its worth the effort.

infection will start and fail in the "preparation phase" when SA is not green.

Copy link
Member

Choose a reason for hiding this comment

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

I thought we could just run PHPStan again before Infection.

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.

infection will run it once before it starts it as a process killer

cat infection.json5 | jq
- name: "Cache Result cache"
uses: actions/cache@v4
Copy link
Member

Choose a reason for hiding this comment

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

This isn't going to save the cache if the build fails, right? Shouldn't we do what's recommended here? https://phpstan.org/user-guide/result-cache#setup-in-github-actions

@ondrejmirtes ondrejmirtes merged commit f64ac55 into phpstan:2.1.x Oct 27, 2025
285 checks passed
@ondrejmirtes
Copy link
Member

Thank you! I'm really interested what it will find here 😊

@staabm staabm deleted the infec branch October 27, 2025 06:14
@staabm
Copy link
Contributor Author

staabm commented Oct 27, 2025

    ____      ____          __  _
   /  _/___  / __/__  _____/ /_(_)___  ____
   / // __ \/ /_/ _ \/ ___/ __/ / __ \/ __ \
 _/ // / / / __/  __/ /__/ /_/ / /_/ / / / /
/___/_/ /_/_/  \___/\___/\__/_/\____/_/ /_/
#StandWithUkraine
Infection - PHP Mutation Testing Framework version 0.31.7
Notice:  You are running Infection with PCOV enabled.
In Assert.php line 1013:
                                                                               
  Expected "PHPStan - PHP Static Analysis Tool dev-648dbd911cef28707338fe5c25  
  875d50e7875391@648dbd9                                                       
  " to be contain a valid SemVer (sub)string value. 

I will check with the infection team in infection/infection#2491 :)

@staabm
Copy link
Contributor Author

staabm commented Oct 27, 2025

ok future PRs to phpstan-src will now have infection coverage, see a first e2e running build in e.g. https://github.com/phpstan/phpstan-src/actions/runs/18841268167/job/53754293666?pr=4470

//cc @maks-rafalko

@maks-rafalko
Copy link

maks-rafalko commented Oct 27, 2025

Cool! Thanks for working on this @staabm and @ondrejmirtes.

Looking forward to hear the results after some time. So please share them somewhere

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.

4 participants