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
Prep work to migrate to PHPUnit 9.x #5269
Conversation
dec10f4
to
c28a11c
Compare
@keradus should it be more appropriate to use |
utilizing (also we would have less maintenance in this project so I'm biased ;) ) |
Good point. Give me a minute to sort this out. |
Should I add |
👍 |
@keradus DM'ing you there! |
As of now Meanwhile this is ready for merge. Migrating to This is a blocker to #5262. Reviewing and merging this will let me to continue my work on #5262. Please consider this. |
@@ -23,7 +23,7 @@ $config = PhpCsFixer\Config::create() | |||
->setRiskyAllowed(true) | |||
->setRules([ | |||
'@PHP56Migration' => true, | |||
'@PHPUnit60Migration:risky' => true, | |||
'@PHPUnit75Migration:risky' => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice 👍
What is the reason for the re-target? |
Oh, I see. The last 2.15.x release has just happened? |
c28a11c
to
5a324d2
Compare
So, what is the status with |
@GrahamCampbell what we're doing there is fairly tricky, and, considering that @keradus is, understandably, looking for an uncompromising quality, at these circumstances I'd like to see it getting as thorough review as possible. Therefore, we have to wait for it to happen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice one ;)
Do I need to squash-rebase it? It's not a big deal, but squash merging will be easier. |
squash doesn't matter. |
acec576
to
cd278fb
Compare
This can be (squash) merged now, I think? |
easy @GrahamCampbell , it will be merged when it will be merged. no need for pinging, especially when you see movement around related changes |
I wasn't rushing. I was just re-approving after the changes you just made. :) |
5ea874f
to
3d8284e
Compare
Thank you @sanmai. |
This is a fully backward-compatible change.
The general idea is to make the package testable under PHP 5.6 - 7.x - 8.0. This requires using both PHPUnit 5.x and 9.x, because only the last works correctly under PHP 8 (as is - collects coverage report).
But PHPUnit 9 has quite a lot of legacy methods removed, and PHPUnit 8 has these methods but with
void
return type. Therefore implementing these methods straight away is a no-go. This can be with a version-dependent trait, but for a small handful of functions used here it easier to do this by overloading them from__call
and__callStatic
. This is whereDeprecatedTestMethods
trait comes into play.And there are also
setUp(): void
etc. which are not taken care in this PR.PolyfillAssertTrait
fromsymfony/phpunit-bridge
, but it is tagged@internal
so it's a risky game to use it.Extracted from #5262 (it handles
setUp(): void
among other things)