Init container before DataProvider is called#4342
Init container before DataProvider is called#4342ondrejmirtes merged 8 commits intophpstan:2.1.xfrom
Conversation
| <extensions> | ||
| <bootstrap class="PHPStan\Testing\PHPUnit\PHPUnitExtension"/> | ||
| </extensions> |
There was a problem hiding this comment.
in case extension developer have to deal with the same race condition problems, we could instruct them to use the extension, which takes care of bootstrapping/re-building the container for them
|
I think we should instruct PHPStan to not scan the files in have no idea yet how todo the php version specific config |
|
This pull request has been marked as ready for review. |
ondrejmirtes
left a comment
There was a problem hiding this comment.
Why is it excluded from analysis? It ships with the PHAR, it should pass the analysis.
There was a problem hiding this comment.
The name should be PHPStanPHPUnitExtension
|
PHP version specific config is already happening, check the files in build/. There's ignore-by-php-version... |
see https://github.com/phpstan/phpstan-src/actions/runs/17822286344/job/50667691251?pr=4342 there are non-ignorable errors.. it seems PHPStan is smart enough to realize that PHPUnit 9.x does not contain the interface the extension is using |
|
You can put excludePaths into a new neon file and add it to includes if the PHPUnit version is older than 10. |
used the already existing old-phpunit.neon for that. |
|
Super nice, thank you! |
without this fix we saw errors like