From ebcd901dc315250a5154ce7c609628ab5cb4ca5c Mon Sep 17 00:00:00 2001 From: iraouf Date: Sun, 23 Jul 2023 12:09:03 +0100 Subject: [PATCH] Fix Method 'getException' not found in ExceptionEvent The 'getException' method is not in ExceptionEvent and should be getThrowable. --- configuration/micro_kernel_trait.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration/micro_kernel_trait.rst b/configuration/micro_kernel_trait.rst index 6955d36a205..2f485666ebc 100644 --- a/configuration/micro_kernel_trait.rst +++ b/configuration/micro_kernel_trait.rst @@ -178,7 +178,7 @@ events directly from the kernel, again it will be registered automatically:: public function onKernelException(ExceptionEvent $event): void { - if ($event->getException() instanceof Danger) { + if ($event->getThrowable() instanceof Danger) { $event->setResponse(new Response('It\'s dangerous to go alone. Take this ⚔')); } }