title: Composer's autloader can't find app class. Why?
body: <p>I have the following file structure:</p>
  
  <pre><code>src/Models/Entity.php 
  vendor/*
  index.php
  composer.*
  </code></pre>
  
  <p>Entity.php contains</p>
  
  <pre><code>&lt;?php
  namespace Vendor\App\Models;
  
  class Entity {}
  </code></pre>
  
  <p>index.php contains</p>
  
  <pre><code>&lt;?php
  namespace Vendor\App;
  
  require 'vendor/autoload.php';
  
  use Vendor\App\Models\Entity;
  
  $entity = new Entity();
  </code></pre>
  
  <p>composer.json contains:</p>
  
  <pre><code>{
      "autoload": {
          "psr-0": {"Vendor\\App\\": "src/"}
      }
  }
  </code></pre>
  
  <p>vendor/composer/autoload_namespaces.php contains</p>
  
  <pre><code>&lt;?php
  
  // autoload_namespaces.php generated by Composer
  
  $vendorDir = dirname(__DIR__);
  $baseDir = dirname($vendorDir);
  
  return array(
      'Vendor\\App\\' =&gt; $baseDir . '/src/',
  );
  </code></pre>
  
  <p>And I get <code>127.0.0.1:37409 [500]: / - Class 'Vendor\App\Models\Entity' not found in ...</code>. </p>
  
  <p>Where is error? What format is for complex namespaces and/or source dir in composer.json?</p>
  
  <p><strong>Updated</strong>: I was found workaround (move src/Models to src/Vendor/App/Models) but is it normal behavior?</p>