Skip to content
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

Allow defining a target PHPUnit version #178

Open
mondrake opened this issue Apr 16, 2023 · 3 comments
Open

Allow defining a target PHPUnit version #178

mondrake opened this issue Apr 16, 2023 · 3 comments

Comments

@mondrake
Copy link

For large codebases (I'm looking into Drupal), it would be good to be able to define a target PHPUnit version, so that checks for later versions could be anticipated while still running previous PHPUnit versions. This would allow to do the prep work in batches - you baseline whatever is expected to be changed for the new version and break down the cleanup in multiple steps.

Example: cd9c693 will report non-static data providers only when PHPUnit 10 is running. But we might want to have the rule enabled while the test codebase is still running PHPUnit 9.

@Boegie
Copy link

Boegie commented Apr 16, 2023

I can see benefit in this (for both Drupal and other projects).

It would make it possible to "be ahead of the game" instead of making a big rush when changing PHPUnit versions on a project.

@ondrejmirtes
Copy link
Member

You can add a CI job (with failure allowed) that upgrades PHPUnit and then runs PHPStan, to let you see “into the future”.

@fredericgboutin-yapla
Copy link

And for those using https://github.com/Yoast/PHPUnit-Polyfills it gets trickier.

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

No branches or pull requests

4 participants