title: Laravel ClassLoader includes an incorrect/old file
body: <p>in a laravel 4 aplication some weeks ago I created a workbench package:</p>
  
  <pre><code>/workbench/no-native/wizard
  </code></pre>
  
  <p>This package has a class called <code>Handler</code> in the path <code>/workbench/no-native/src/events/</code> declared like this:</p>
  
  <pre><code>&lt;?php
  namespace Wizard\events;
  
  class Handler{
  
      ....
  </code></pre>
  
  <p>In order to dump-autoload via composer, I added it:</p>
  
  <pre><code>"autoload": {
      "classmap": [
          "src/migrations",
          "src/controllers",
          "src/events",
      ],
      "psr-0": {
          "NoNative\\Wizard\\": "src/"
      }
  },
  </code></pre>
  
  <p>Well, with this structure the package worked very well. Yerterday, I had to move this package from <code>workbench/no-native</code> to <code>workbench/native</code>. The steps were the following:</p>
  
  <ol>
  <li>Move the <code>wizard</code> dir from <code>no-native</code> to <code>native</code> dir.</li>
  <li>Update paths and namespaces.</li>
  <li>Update the package composer to target the new file structure.</li>
  <li><p>Execute the following commands (in <code>native</code>, the new path):</p>
  
  <pre><code>/home/user/public_html/my-app/workbench/native/wizard# composer update
  /home/user/public_html/my-app/workbench/native/wizard# composer dump-autoload
  </code></pre></li>
  </ol>
  
  <p>After finished, I notice that <strong><em>in my localhost instance the application works perfectly</em></strong> with the changes, but in my live server an exception is showed:</p>
  
  <blockquote>
    <p><strong>include(/home/user/public_html/my-app/workbench/no-native/wizard/src/events/Handler.php):
    failed to open stream: No such file or directory file:</strong>
    /home/user/public_html/my-app/vendor/composer/ClassLoader.php line 382</p>
  </blockquote>
  
  <p>I assume that the application still trying to load the Handler class from old path. Then, I ran the commands in order to "clean" or "optimize" the application:</p>
  
  <pre><code># php artisan optimize
  # php artisan dump-autoload
  </code></pre>
  
  <p>And the exception still there. The live server has the same code of my localhost instance, because both work with cloned sources via Github. I do not know  if I am missing something else. My last option is to create a new package via command, and then create the classes again. But before to do that, I would like to ask to you for alternative options.</p>
  
  <p>Thank you in advance.</p>