POC: lightweight subprocess isolation via pcntl_fork() #1230
ci.yaml
on: pull_request
Dependency Validation
16s
Coding Guidelines
58s
Matrix: Unit Tests
Type Checker
33s
Matrix: End-to-End Tests
Matrix: Test PHAR
Annotations
11 errors and 7 warnings
MissingThrowsDocblock:
src/Util/PHP/PcntlFork.php#L64
src/Util/PHP/PcntlFork.php:64:13: MissingThrowsDocblock: Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
MissingThrowsDocblock:
src/Util/PHP/PcntlFork.php#L85
src/Util/PHP/PcntlFork.php:85:19: MissingThrowsDocblock: PHPUnit\Runner\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
MissingThrowsDocblock:
src/Util/PHP/PcntlFork.php#L85
src/Util/PHP/PcntlFork.php:85:19: MissingThrowsDocblock: PHPUnit\Framework\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
MissingThrowsDocblock:
src/Util/PHP/PcntlFork.php#L85
src/Util/PHP/PcntlFork.php:85:19: MissingThrowsDocblock: PHPUnit\Event\NoPreviousThrowableException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
MissingThrowsDocblock:
src/Util/PHP/PcntlFork.php#L94
src/Util/PHP/PcntlFork.php:94:17: MissingThrowsDocblock: PHPUnit\Event\InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
MissingThrowsDocblock:
src/Util/PHP/PcntlFork.php#L103
src/Util/PHP/PcntlFork.php:103:24: MissingThrowsDocblock: PHPUnit\Runner\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
MissingThrowsDocblock:
src/Util/PHP/PcntlFork.php#L103
src/Util/PHP/PcntlFork.php:103:24: MissingThrowsDocblock: PHPUnit\Framework\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
MissingThrowsDocblock:
src/Util/PHP/PcntlFork.php#L103
src/Util/PHP/PcntlFork.php:103:24: MissingThrowsDocblock: PHPUnit\Event\NoPreviousThrowableException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
MissingThrowsDocblock:
src/Util/PHP/PcntlFork.php#L103
src/Util/PHP/PcntlFork.php:103:24: MissingThrowsDocblock: PHPUnit\Util\Exception is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
MissingThrowsDocblock:
src/Util/PHP/PcntlFork.php#L103
src/Util/PHP/PcntlFork.php:103:24: MissingThrowsDocblock: SebastianBergmann\CodeCoverage\InvalidArgumentException is thrown but not caught - please either catch or add a @throws annotation (see https://psalm.dev/169)
|
Coding Guidelines
Process completed with exit code 8.
|
Mutation Testing:
src/Framework/TestBuilder.php#L66
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
/** @psalm-suppress UnsafeInstantiation */
$test = new $className($methodName);
- $this->configureTestCase($test, $this->shouldTestMethodBeRunInSeparateProcess($className, $methodName), $this->shouldGlobalStateBePreserved($className, $methodName), $this->shouldAllTestMethodsOfTestClassBeRunInSingleSeparateProcess($className), $this->shouldForkIfPossible($className, $methodName), $this->backupSettings($className, $methodName));
+
return $test;
}
/**
|
Mutation Testing:
src/Framework/TestBuilder.php#L101
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
/** @psalm-suppress UnsafeInstantiation */
$_test = new $className($methodName);
$_test->setData($_dataName, $_data);
- $this->configureTestCase($_test, $runTestInSeparateProcess, $preserveGlobalState, $runClassInSeparateProcess, $forkIfPossible, $backupSettings);
+
$dataProviderTestSuite->addTest($_test, $groups);
}
return $dataProviderTestSuite;
|
Mutation Testing:
src/Framework/TestBuilder.php#L129
Escaped Mutant for Mutator "IfNegation":
--- Original
+++ New
@@ @@
if ($runClassInSeparateProcess) {
$test->setRunClassInSeparateProcess(true);
}
- if ($forkIfPossible) {
+ if (!$forkIfPossible) {
$test->setForkIfPossible(true);
}
if ($preserveGlobalState !== null) {
|
Mutation Testing:
src/Framework/TestBuilder.php#L130
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
$test->setRunClassInSeparateProcess(true);
}
if ($forkIfPossible) {
- $test->setForkIfPossible(true);
+ $test->setForkIfPossible(false);
}
if ($preserveGlobalState !== null) {
$test->setPreserveGlobalState($preserveGlobalState);
|
Mutation Testing:
src/Framework/TestBuilder.php#L130
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$test->setRunClassInSeparateProcess(true);
}
if ($forkIfPossible) {
- $test->setForkIfPossible(true);
+
}
if ($preserveGlobalState !== null) {
$test->setPreserveGlobalState($preserveGlobalState);
|
Mutation Testing:
src/Framework/TestBuilder.php#L301
Escaped Mutant for Mutator "NotIdentical":
--- Original
+++ New
@@ @@
$metadata = $metadataForMethod->isRunInSeparateProcess()->asArray()[0];
assert($metadata instanceof RunInSeparateProcess);
$forkIfPossible = $metadata->forkIfPossible();
- if ($forkIfPossible !== null) {
+ if ($forkIfPossible === null) {
return $forkIfPossible;
}
}
|
Mutation Testing:
src/Framework/TestBuilder.php#L332
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
return $forkIfPossible;
}
}
- return false;
+ return true;
}
}
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
phpunit-snapshot-phar
Expired
|
679 KB |
|