Gets Error
Generating optimized autoload files
Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi
PHP Fatal error: Declaration of App\Exceptions\Handler::report(Exception $exception) must be compatible with Illuminate\Foundation\Exceptions\Handler::report(Throwable $e) in D:\xampp\htdocs\bookster\webapp\Exceptions\Handler.php on line 8
PHP Fatal error: Uncaught ReflectionException: Class App\Exceptions\Handler does not exist in D:\xampp\htdocs\bookster\web\vendor\laravel\framework\src\Illuminate\Container\Container.php:803
Stack trace:0 D:\xampp\htdocs\bookster\web\vendor\laravel\framework\src\Illuminate\Container\Container.php(803): ReflectionClass->__construct('App\Exceptions\...')
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
I am also attaching my composer.json and composer.lock file
Please follow the upgrading guide.
https://laravel.com/docs/7.x/upgrade#symfony-5-related-upgrades
if you not changed anything in the handler. copy paste this file:
https://github.com/laravel/laravel/blob/master/app/Exceptions/Handler.php
I'm not using laravel. I still have an 5 years old application in my dead repository. Sad.
@spelbreker It was missing the Exceptions folder and also the Handler.php file.
After created these worked pretty well.
Thanks a lot!
Thanks @spelbreker worked for me too.
Most helpful comment
if you not changed anything in the handler. copy paste this file:
https://github.com/laravel/laravel/blob/master/app/Exceptions/Handler.php