-
Notifications
You must be signed in to change notification settings - Fork 131
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
Added test-case for deprecated phpstorm stub with patch-version #1406
Conversation
Was it an escaped / uncovered mutation? |
I don't know. I am not a mutation testing expert. but I realized that this is a path which wasn't test-covered before while working on the PHPStan integration |
I was more wondering if mainline caught it - should be visible in the MT framework output :D |
(wrong button - thanks Github for not dong TAB+ENTER correctly) |
So I think there may be some escaped mutants now... |
FWIW, in mainline:
That should be OK with this patch now :) This is mostly to show @staabm how to read this: I think MT is something that will be great for your testing toolbox, since you are so detail-oriented 💪 |
I don't see mutation changes here: I think your test scenario did not hit the edge case you were going for, as the mutations stayed the same :D |
thanks for the explanation. lets see whether we can kill some mainline mutants with nikic/PHP-Parser#985 :-) |
looking at the latest build of the latest https://github.com/Roave/BetterReflection/actions/runs/8259610533/job/22593799759 |
$stubData->getStub(), | ||
); | ||
|
||
if (PHP_VERSION_ID >= 80100) { |
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.
ahh I think we don't catch a bug because we never reach the ELSE case of this condition (because CI is running only 8.2/8.3)
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.
Ah, good catch! Indeed!
Perhaps we can change the fixture to introduce deprecations with higher/fictional PHP versions? :D
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.
Let me first make sure phpstan can catch such bugs in the future. Brb
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.
phpstan/phpstan-src#2968 should help us in the future.
superseded by #1408 |
tests the ternary in
BetterReflection/src/SourceLocator/SourceStubber/PhpStormStubsSourceStubber.php
Line 677 in ab47d0b