title: Error upgrading from L5.4 to L5.4 : Uncaught ReflectionException: Class hash does not exist in src/Illuminate/Container/Container.php:681
body: <p>I am trying to  upgrade Laravel 5.3 to 5.4, with <a href="https://laravel.com/docs/master/upgrade" rel="nofollow noreferrer">official docs</a></p>
  
  <p>But when I do: composer update, I get this error: </p>
  
  <pre><code>Loading composer repositories with package information
  Updating dependencies (including require-dev)
  Package operations: 1 install, 15 updates, 11 removals
  - Removing graham-campbell/htmlmin (v4.5.0)
  - Removing jeremeamia/superclosure (2.3.0)
  - Removing classpreloader/classpreloader (3.1.0)
  - Removing symfony/polyfill-php56 (v1.3.0)
  - Removing symfony/polyfill-util (v1.3.0)
  - Removing nikic/php-parser (v2.1.1)
  - Removing mrclay/minify (2.3.0)
  - Removing psy/psysh (v0.7.2)
  - Removing dnoegel/php-xdg-base-dir (0.1)
  - Removing jakub-onderka/php-console-highlighter (v0.3.2)
  - Removing jakub-onderka/php-console-color (0.1)
  - Updating symfony/var-dumper (v3.1.9 =&gt; v3.2.2) Loading from cache
  - Updating symfony/routing (v3.1.9 =&gt; v3.2.2) Downloading: 100%
  - Updating symfony/process (v3.1.9 =&gt; v3.2.2) Downloading: 100%
  - Updating symfony/debug (v3.1.9 =&gt; v3.2.2) Downloading: 100%
  - Updating symfony/http-foundation (v3.1.9 =&gt; v3.2.2) Downloading: 100%
  - Updating symfony/http-kernel (v3.1.9 =&gt; v3.2.2) Downloading: 100%
  - Updating symfony/finder (v3.1.9 =&gt; v3.2.2) Downloading: 100%
  - Updating symfony/console (v3.1.9 =&gt; v3.2.2) Downloading: 100%
  - Updating symfony/translation (v3.1.9 =&gt; v3.2.2) Loading from cache
  - Installing erusev/parsedown (1.6.1) Loading from cache
  - Updating laravel/framework (v5.3.20 =&gt; v5.4.6) Downloading: 100%
  - Removing laravelcollective/html (dev-master c4c8791)
  - Installing laravelcollective/html (5.4.x-dev 7570f25) Downloading: 100%
  - Updating laravel/socialite (v2.0.20 =&gt; v3.0.0) Downloading: 100%
  - Updating spatie/laravel-backup (3.10.2 =&gt; 3.10.1) Downloading: 100%
  - Updating owen-it/laravel-auditing (2.4.5 =&gt; 2.3.7) Downloading: 100%
  - Updating laravel/passport (v1.0.17 =&gt; v2.0.1) Downloading: 100%
  Writing lock file
  Generating autoload files
  &gt; Illuminate\Foundation\ComposerScripts::postUpdate
  &gt; php artisan optimize
  PHP Fatal error:  Uncaught ReflectionException: Class hash does not exist in .../vendor/laravel/framework/src/Illuminate/Container/Container.php:681
  Stack trace:
  #0 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(681): ReflectionClass-&gt;__construct('hash')
  #1 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(565): Illuminate\Container\Container-&gt;build('hash')
  #2 .../vendor/laravel/framework/src/Illuminate/Foundation/Application.php(702): Illuminate\Container\Container-&gt;make('hash')
  #3 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(1070): Illuminate\Foundation\Application-&gt;make('hash')
  #4 .../vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php(65): Illuminate\Container\Contain in .../vendor/laravel/framework/src/Illuminate/Container/Container.php on line 681
  PHP Fatal error:  Uncaught ReflectionException: Class hash does not exist in .../vendor/laravel/framework/src/Illuminate/Container/Container.php:681
  Stack trace:
  #0 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(681): ReflectionClass-&gt;__construct('hash')
  #1 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(565): Illuminate\Container\Container-&gt;build('hash')
  #2 .../vendor/laravel/framework/src/Illuminate/Foundation/Application.php(702): Illuminate\Container\Container-&gt;make('hash')
  #3 .../vendor/laravel/framework/src/Illuminate/Container/Container.php(1070): Illuminate\Foundation\Application-&gt;make('hash')
  #4 .../vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php(65): Illuminate\Container\Contain in .../vendor/laravel/framework/src/Illuminate/Container/Container.php on line 681
  Script php artisan optimize handling the post-update-cmd event returned with error code 255
  </code></pre>
  
  <p>Also, here is the list of providers in my app.php</p>
  
  <pre><code>'providers' =&gt; [
  
      /*
       * Laravel Framework Service Providers...
       */
      Illuminate\Auth\AuthServiceProvider::class,
      Illuminate\Broadcasting\BroadcastServiceProvider::class,
      Illuminate\Bus\BusServiceProvider::class,
      Illuminate\Cache\CacheServiceProvider::class,
      Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
      Illuminate\Cookie\CookieServiceProvider::class,
      Illuminate\Database\DatabaseServiceProvider::class,
      Illuminate\Encryption\EncryptionServiceProvider::class,
      Illuminate\Filesystem\FilesystemServiceProvider::class,
      Illuminate\Foundation\Providers\FoundationServiceProvider::class,
      Illuminate\Hashing\HashServiceProvider::class,
      Illuminate\Mail\MailServiceProvider::class,
      Illuminate\Notifications\NotificationServiceProvider::class,
      Illuminate\Pagination\PaginationServiceProvider::class,
      Illuminate\Pipeline\PipelineServiceProvider::class,
      Illuminate\Queue\QueueServiceProvider::class,
      Illuminate\Redis\RedisServiceProvider::class,
      Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
      Illuminate\Session\SessionServiceProvider::class,
      Illuminate\Translation\TranslationServiceProvider::class,
      Illuminate\Validation\ValidationServiceProvider::class,
      Illuminate\View\ViewServiceProvider::class,
  
      /*
       * Package Service Providers...
       */
  
      Laravel\Socialite\SocialiteServiceProvider::class,
      Torann\GeoIP\GeoIPServiceProvider::class,
      Maatwebsite\Excel\ExcelServiceProvider::class,
      Barryvdh\Debugbar\ServiceProvider::class,
      Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
      Barryvdh\Snappy\ServiceProvider::class,
      DaveJamesMiller\Breadcrumbs\ServiceProvider::class,
      Cviebrock\EloquentSluggable\ServiceProvider::class,
      Spatie\Backup\BackupServiceProvider::class,
      Spatie\LinkChecker\LinkCheckerServiceProvider::class,
      Artesaos\SEOTools\Providers\SEOToolsServiceProvider::class,
      Proengsoft\JsValidation\JsValidationServiceProvider::class,
      Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider::class,
      Intervention\Image\ImageServiceProvider::class,
      OwenIt\Auditing\AuditingServiceProvider::class,
      Barryvdh\TranslationManager\ManagerServiceProvider::class,
      Sentry\SentryLaravel\SentryLaravelServiceProvider::class,
      Collective\Html\HtmlServiceProvider::class,
      Laravolt\Avatar\ServiceProvider::class,
      Laravel\Passport\PassportServiceProvider::class,
      Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::class,
  
  
      /*
       * Application Service Providers...
       */
      App\Providers\AppServiceProvider::class,
      // App\Providers\BroadcastServiceProvider::class,
      App\Providers\AuthServiceProvider::class,
      App\Providers\EventServiceProvider::class,
      App\Providers\RouteServiceProvider::class,
  
  
  ],
  
  /*
  |--------------------------------------------------------------------------
  | Class Aliases
  |--------------------------------------------------------------------------
  |
  | This array of class aliases will be registered when this application
  | is started. However, feel free to register as many as you wish as
  | the aliases are "lazy" loaded so they don't hinder performance.
  |
  */
  
  'aliases' =&gt; [
  
      'App' =&gt; Illuminate\Support\Facades\App::class,
      'Artisan' =&gt; Illuminate\Support\Facades\Artisan::class,
      'Auth' =&gt; Illuminate\Support\Facades\Auth::class,
      'Blade' =&gt; Illuminate\Support\Facades\Blade::class,
      'Cache' =&gt; Illuminate\Support\Facades\Cache::class,
      'Config' =&gt; Illuminate\Support\Facades\Config::class,
      'Cookie' =&gt; Illuminate\Support\Facades\Cookie::class,
      'Crypt' =&gt; Illuminate\Support\Facades\Crypt::class,
      'DB' =&gt; Illuminate\Support\Facades\DB::class,
      'Eloquent' =&gt; Illuminate\Database\Eloquent\Model::class,
      'Event' =&gt; Illuminate\Support\Facades\Event::class,
      'File' =&gt; Illuminate\Support\Facades\File::class,
      'Gate' =&gt; Illuminate\Support\Facades\Gate::class,
      'Hash' =&gt; Illuminate\Support\Facades\Hash::class,
      'Lang' =&gt; Illuminate\Support\Facades\Lang::class,
      'Log' =&gt; Illuminate\Support\Facades\Log::class,
      'Mail' =&gt; Illuminate\Support\Facades\Mail::class,
      'Notification' =&gt; Illuminate\Support\Facades\Notification::class,
      'Password' =&gt; Illuminate\Support\Facades\Password::class,
      'Queue' =&gt; Illuminate\Support\Facades\Queue::class,
      'Redirect' =&gt; Illuminate\Support\Facades\Redirect::class,
      'Redis' =&gt; Illuminate\Support\Facades\Redis::class,
      'Request' =&gt; Illuminate\Support\Facades\Request::class,
      'Response' =&gt; Illuminate\Support\Facades\Response::class,
      'Route' =&gt; Illuminate\Support\Facades\Route::class,
      'Schema' =&gt; Illuminate\Support\Facades\Schema::class,
      'Session' =&gt; Illuminate\Support\Facades\Session::class,
      'Storage' =&gt; Illuminate\Support\Facades\Storage::class,
      'URL' =&gt; Illuminate\Support\Facades\URL::class,
      'Validator' =&gt; Illuminate\Support\Facades\Validator::class,
      'View' =&gt; Illuminate\Support\Facades\View::class,
      'Form'      =&gt; Collective\Html\FormFacade::class,
      'Html'      =&gt; Collective\Html\HtmlFacade::class,
      'Countries' =&gt; Webpatser\Countries\CountriesFacade::class,
      'Socialize' =&gt; Laravel\Socialite\Facades\Socialite::class,
      'GeoIP' =&gt; Torann\GeoIP\Facades\GeoIP::class,
      'Excel' =&gt; Maatwebsite\Excel\Facades\Excel::class,
      'Debugbar' =&gt; Barryvdh\Debugbar\Facade::class,
      'Breadcrumbs' =&gt; DaveJamesMiller\Breadcrumbs\Facade::class,
      'SEOMeta'   =&gt; Artesaos\SEOTools\Facades\SEOMeta::class,
      'OpenGraph' =&gt; Artesaos\SEOTools\Facades\OpenGraph::class,
      'Twitter'   =&gt; Artesaos\SEOTools\Facades\TwitterCard::class,
      'SEO' =&gt; Artesaos\SEOTools\Facades\SEOTools::class,
      'JsValidator' =&gt; Proengsoft\JsValidation\Facades\JsValidatorFacade::class,
      'Gravatar' =&gt; Thomaswelton\LaravelGravatar\Facades\Gravatar::class,
      'Image' =&gt; Intervention\Image\Facades\Image::class,
      'Sentry' =&gt; Sentry\SentryLaravel\SentryFacade::class,
      'Avatar'    =&gt; Laravolt\Avatar\Facade::class,
      'PDF' =&gt; Barryvdh\Snappy\Facades\SnappyPdf::class,
      'SnappyImage' =&gt; Barryvdh\Snappy\Facades\SnappyImage::class,
  ],
  </code></pre>
  
  <p>Any idea what's generating the error???</p>