I’m using Laravel 6 and getting the following error when deploying to a shared host running PHP 7.3:
AppExceptionsHandler::report(Throwable $exception)
Declaration of AppExceptionsHandler::report(Throwable $exception) must be compatible with IlluminateFoundationExceptionsHandler::report(Exception $e) in /home/kb2hm3y8r4wm/public_html/laravel.supremeanimation.com/app/Exceptions/Handler.php on line 8
Advertisement
Answer
I think the error you’re getting is due to changes on Laravel 7 (not 6), as you can see on Laravel 7 upgrade guide. Check this:
For Laravel < 7:
The report and render methods of your application’s
AppExceptionsHandler
class should accept instances of theException
interface instead ofThrowable
instances:use Exception; public function report(Exception $exception); public function render($request, Exception $exception);
For Laravel >= 7:
The report and render methods of your application’s
AppExceptionsHandler
class should accept instances of theThrowable
interface instead ofException
instances:use Throwable; public function report(Throwable $exception); public function render($request, Throwable $exception);