-
Notifications
You must be signed in to change notification settings - Fork 545
Update phpstan-phpunit to 2.0.8 #4490
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
Conversation
|
looking at the PHP 7.x errors: I think we have these alternatives to fix these errors: wdyt? |
|
About:
I'd say this is a phpstan-phpunit bug. The rule should match how PHPUnit behaves. Does it always do basically array_values on the args (so that only the order matters), or does it keep named args on PHP 8+? |
see |
|
and here a failling one: |
|
PHP8.3 on PHPUnit 9.6 PHP8.3 on PHPUnit 11.5 |
|
I don't get it. TableErrorFormatterTest.php works on 7.4. |
one of my above comments was wrong. I deleted it. |
|
Also "must be of the type int, string given" doesn't look like named arguments error, just argument type mismatch. |
|
The thing is - does PHPUnit try to match cachedNodesByStringCountExpected against parameter name on PHP 8+ or is it always just about key order? The rule should match that. |
|
PHPUnit 9.6 implementation is here: https://github.com/sebastianbergmann/phpunit/blob/3ee3d102eef928587fc72d166271d2fb1a8dfa2b/src/Framework/TestCase.php#L1617 PHPUnit 11.5 slightly different: https://github.com/sebastianbergmann/phpunit/blob/32e5fd8bccf79567f281e2191a0304d396c08065/src/Framework/TestCase.php#L1657 |
|
ok, I finally did more testing and have a better idea. I think PHPUnit 9.x/10.x does not at all support named arguments from data-providers (no matter PHP version). |
|
The rule should reflect that, it'd be very useful! |
|
Thank you! |
No description provided.