diff --git a/src/Kernel.php b/src/Kernel.php index 28232891..68de228b 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -163,7 +163,7 @@ final class Kernel $this->terminate(); if (is_array($error = error_get_last())) { - if (! in_array($error['type'], [E_ERROR, E_CORE_ERROR], true)) { + if (! in_array($error['type'], [E_ERROR, E_COMPILE_ERROR, E_CORE_ERROR], true)) { return; } diff --git a/src/KernelDump.php b/src/KernelDump.php index e1c67da5..4ecfe24b 100644 --- a/src/KernelDump.php +++ b/src/KernelDump.php @@ -68,6 +68,10 @@ final class KernelDump $type = 'INFO'; + if (is_array($error = error_get_last()) && in_array($error['type'], [E_ERROR, E_COMPILE_ERROR, E_CORE_ERROR], true)) { + return; + } + if ($this->isInternalError($this->buffer)) { $type = 'ERROR'; $this->buffer = str_replace( @@ -107,7 +111,6 @@ final class KernelDump */ private function isInternalError(string $output): bool { - return str_contains($output, 'An error occurred inside PHPUnit.') - || str_contains($output, 'Fatal error'); + return str_contains($output, 'An error occurred inside PHPUnit.'); } } diff --git a/src/Plugins/Parallel/Paratest/WrapperRunner.php b/src/Plugins/Parallel/Paratest/WrapperRunner.php index 331b0c7d..19ce3d1a 100644 --- a/src/Plugins/Parallel/Paratest/WrapperRunner.php +++ b/src/Plugins/Parallel/Paratest/WrapperRunner.php @@ -146,7 +146,6 @@ final class WrapperRunner implements RunnerInterface public function run(): int { $directory = dirname(__DIR__); - assert($directory !== ''); ExcludeList::addDirectory($directory); TestResultFacade::init(); EventFacade::instance()->seal();