-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add $schema
to infection.json5.dist, exclude files that breaks PHPUnit execution with Infection
#5792
Conversation
…t execution with Infection See sebastianbergmann#5788
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5792 +/- ##
=========================================
Coverage 90.17% 90.17%
Complexity 6582 6582
=========================================
Files 693 693
Lines 19940 19940
=========================================
Hits 17980 17980
Misses 1960 1960 ☔ View full report in Codecov by Sentry. |
Thank you 🙏 |
I am thankful for your work, @maks-rafalko and @staabm, but I am still seeing issues such as this basically everywhere I look: The Infection's However, when I perform this mutation manually ... diff --git a/src/Event/Events/Test/Lifecycle/Finished.php b/src/Event/Events/Test/Lifecycle/Finished.php
index 72032cf71..ae75d35c1 100644
--- a/src/Event/Events/Test/Lifecycle/Finished.php
+++ b/src/Event/Events/Test/Lifecycle/Finished.php
@@ -37,7 +37,7 @@ public function telemetryInfo(): Telemetry\Info
return $this->telemetryInfo;
}
- public function test(): Code\Test
+ protected function test(): Code\Test
{
return $this->test;
} ... and try to run PHPUnit's test suite then I get this error:
The mutation causes an error in PHPUnit's test runner that is not specific to a single test. Sure, we can exclude mutators and/or source files. But I doubt that this will lead to a useful report. I fear that we must accept the fact that mutating the test (framework|runner) while running its test is an edge case that neither of us should worry about: Infection should not be adapted to cater to the mutation testing of PHPUnit, nor should PHPUnit be adapted so that mutation testing can be performed on it. Maybe I am just too pessimistic here, but, as always, I love to be proven wrong. In the near future (days/weeks, not months), I will add Infection to the dependencies of PHPUnit (see #5788 (comment)). This should be more straightforward. |
Lets let this sink for a while and look into what solutions we can find :-) |
See #5788 (comment) for the detailed explanation about what is going on and why it's needed.