title: Uncaught ReflectionException: Class log does not exist in /vendor/laravel/framework/src/Illuminate/Container/Container.php:738
body: <p>I had my Laravel 5.2 working well, I was happy.</p>
  
  <p>Then I executed : </p>
  
  <pre><code> php artisan config:cache
  </code></pre>
  
  <p>And my day became darker</p>
  
  <p>I got this message:</p>
  
  <pre><code>PHP Fatal error:  Uncaught ReflectionException: Class log does not exist in /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:738
  Stack trace:
  #0 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php(738): ReflectionClass-&gt;__construct('log')
  #1 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php(633): Illuminate\Container\Container-&gt;build('log', Array)
  #2 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(687): Illuminate\Container\Container-&gt;make('log', Array)
  #3 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php(853): Illuminate\Foundation\Application-&gt;make('log')
  #4 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php(808): Illuminate\Container\Container-&gt;resolveClass(Object(    ReflectionParameter))
  #5 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php(777): Illuminate\Container\Container-&gt;getDependencies(Arr in /home/vagrant/    Code/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 738
  
  Fatal error: Uncaught ReflectionException: Class log does not exist in /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php on line     738
  
  ReflectionException: Class log does not exist in /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 738
  
  Call Stack:
      0.0007     351952   1. {main}() /home/vagrant/Code/artisan:0
      0.2149    2190096   2. Illuminate\Foundation\Console\Kernel-&gt;handle() /home/vagrant/Code/artisan:35
      0.2329    2327800   3. Illuminate\Foundation\Console\Kernel-&gt;reportException() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Console/    Kernel.php:117
      0.2329    2327840   4. Illuminate\Container\Container-&gt;offsetGet() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:250
      0.2329    2327840   5. Illuminate\Foundation\Application-&gt;make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:1178
      0.2329    2327896   6. Illuminate\Container\Container-&gt;make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:687
      0.2329    2327896   7. Illuminate\Container\Container-&gt;build() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:633
      0.2329    2327896   8. Illuminate\Container\Container-&gt;Illuminate\Container\{closure}() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/    Container.php:735
      0.2329    2327896   9. Illuminate\Foundation\Application-&gt;make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:230
      0.2329    2327896  10. Illuminate\Container\Container-&gt;make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:687
      0.2329    2327896  11. Illuminate\Container\Container-&gt;build() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:633
      0.2439    2371256  12. Illuminate\Container\Container-&gt;getDependencies() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:777
      0.2491    2378936  13. Illuminate\Container\Container-&gt;resolveClass() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:808
      0.2491    2378936  14. Illuminate\Foundation\Application-&gt;make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:853
      0.2491    2378992  15. Illuminate\Container\Container-&gt;make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:687
      0.2491    2378992  16. Illuminate\Container\Container-&gt;build() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:633
      0.2491    2379104  17. ReflectionClass-&gt;__construct() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:738
  </code></pre>
  
  <p>I don't really know how to debug it, </p>
  
  <p>I tried to remove anything that I lastely did.
  Some says it is a .env file with spaces inside, but not in my case, so basically, I don't know how to debug it.</p>
  
  <p>I tried</p>
  
  <pre><code>composer dump-autoload
  </code></pre>
  
  <p>I tried to delete vendor folder</p>
  
  <p>All php artisan commands fails.</p>
  
  <p>It seems to happen to a lot of people but the cause always different and difficult to debug.</p>
  
  <p>Any help will be appreciated!</p>
  
  <p>EDIT 1: I could restore a functional version of my site deleting </p>
  
  <pre><code>bootstrap/cache/config.php
  </code></pre>
  
  <p>I also did a php artisan config:cache before it fails</p>
  
  <p>and restoring a previous version of </p>
  
  <pre><code>    bootstrap/cache/services.php
  </code></pre>
  
  <p>But I would like to use those commands, because they make a significant difference in production!</p>