title: Laravel 7 throws error 255 upgrading from laravel 6
body: <p>I just tried to upgrade Laravel from v6 to v7, my php version is 7.3, i upgraded all dependencies as stated on laravel site, and removed conflicting packages, the upgrade seems to be completed but with the following error:</p>
  
  <pre><code>Generating optimized autoload files&gt; Illuminate\Foundation\ComposerScripts::postAutoloadDump
  &gt; @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 /var/www/html/virtuozzo-api/app/Exceptions/Handler.php on line 8
  PHP Fatal error:  Uncaught ReflectionException: Class App\Exceptions\Handler does not exist in /var/www/html/virtuozzo-api/vendor/laravel/framework/src/Illuminate/Container/Container.php:803
  Stack trace:
  #0 /var/www/html/virtuozzo-api/vendor/laravel/framework/src/Illuminate/Container/Container.php(803): ReflectionClass-&gt;__construct('App\\Exceptions\\...')
  #1 /var/www/html/virtuozzo-api/vendor/laravel/framework/src/Illuminate/Container/Container.php(681): Illuminate\Container\Container-&gt;build('App\\Exceptions\\...')
  #2 /var/www/html/virtuozzo-api/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(787): Illuminate\Container\Container-&gt;resolve('App\\Exceptions\\...', Array, false)
  #3 /var/www/html/virtuozzo-api/vendor/laravel/framework/src/Illuminate/Container/Container.php(265): Illuminate\Foundation\Application-&gt;resolve('App\\Exceptions\\...', Array, false)
  #4 /var/www/html/virtuozzo-api/vendor/laravel/framework/src/Illuminate/Container/Container.php(799): Illuminate\Container\Container-&gt;Illuminate\Container\{cl in /var/www/html/virtuozzo-api/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 805
  Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
  </code></pre>
  
  <p>i have tried already deleting the vendor folder and installing again, also with composer dump autoload, and tried to clear laravel cache, but always get the same error.</p>