title: Uncaught ReflectionException: Class env does not exist after upgrade to Laravel 5.6
body: <p>After upgrading to Laravel from 5.5 to 5.6.12 I get following exception:</p>
  
  <blockquote>
    <p>PHP Fatal error:  Uncaught ReflectionException: Class env does not exist in /var/www/showroom-ng/vendor/laravel/framework/src/Illuminate/Container/Container.php:767
    Stack trace:
    0 /var/www/showroom-ng/vendor/laravel/framework/src/Illuminate/Container/Container.php(767): ReflectionClass->__construct('env')
    1 /var/www/showroom-ng/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build('env')
    2 /var/www/showroom-ng/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('env', Array)
    3 /var/www/showroom-ng/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(747): Illuminate\Container\Container->make('env', Array)
    4 /var/www/showroom-ng/vendor/laravel/framework/src/Illuminate/Container/Container.php(1210): Illuminate\Foundation\Application->make('env')
    5 /var/www/showroom-ng/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(492): Illuminate\Container\Container->offsetGet('env')
    6 /var/www in /var/www/showroom-ng/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 767</p>
  </blockquote>
  
  <p>I don't see anything related in the upgrade guide.</p>
  
  <p>I tried to dig into Laravel internals, and for example removing code:</p>
  
  <pre><code>    if (! $app-&gt;environment('testing')) {
          ini_set('display_errors', 'Off');
      }
  </code></pre>
  
  <p>from vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php removes one occurrence of mentioned exception, but there is some other place which is causing the same one. I tried to use lower 5.6 versions of Laravel, but it doesn't change anything.</p>