From 837552b11d15bd05bd2790462fa696dfde880de5 Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Mon, 13 Mar 2023 21:36:48 +0000 Subject: [PATCH] feat: improves dumper --- src/Kernel.php | 8 +------- src/KernelDump.php | 3 ++- 2 files changed, 3 insertions(+), 8 deletions(-) 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'); } }