diff --git a/src/Kernel.php b/src/Kernel.php index 25f2aadd..b56d32bd 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -40,13 +40,7 @@ final class Kernel private readonly Application $application, private readonly OutputInterface $output, ) { - register_shutdown_function(function (): void { - if (error_get_last() !== null) { - return; - } - - $this->shutdown(); - }); + register_shutdown_function(fn () => $this->shutdown()); } /** diff --git a/src/KernelDump.php b/src/KernelDump.php index dac8bafb..39f2004b 100644 --- a/src/KernelDump.php +++ b/src/KernelDump.php @@ -107,6 +107,7 @@ final class KernelDump */ private function isInternalError(string $output): bool { - return str_contains($output, 'An error occurred inside PHPUnit.'); + return str_contains($output, 'An error occurred inside PHPUnit.') + || str_contains($output, 'Fatal error'); } }