title: Composer psr-0 autoloading of custom namespaces does not work
body: <p>I have trouble adding my own namespaces to composer with PSR-0. I have read <a href="https://stackoverflow.com/questions/12247431/custom-code-management-with-the-composer-auto-loader/12248348#12248348%20">this</a> and <a href="https://stackoverflow.com/questions/18146057/composer-autoloader-psr-0-namespaces">this</a> but I still can't make it work</p>
  
  <p>composer.json</p>
  
  <pre><code>{
  "require": {
      "klein/klein": "2.0.x",
      "doctrine/orm": "2.4.4"
  
  },
  "autoload": {
      "psr-0": {
          "mynamespace":        "src/"
          }
  }
  }
  </code></pre>
  
  <p>The <code>src</code> folder is placed inside the same directory as <code>composer.json</code></p>
  
  <p>The <code>src</code> directory has the following structure  </p>
  
  <pre><code>src
  └── mynamespace
      ├── Keys.php
  </code></pre>
  
  <p>Keys.php</p>
  
  <pre><code>&lt;?php
  namespace mynamespace\Keys;
  
  define ("API_KEY", "XXXXXXXXXXXX");
  ?&gt;
  </code></pre>
  
  <p>index.php</p>
  
  <p>
  
  <pre><code>use Klein\Klein;
  use mynamespace\Keys;
  require_once __DIR__ . '/vendor/autoload.php';
  
  $klein = new Klein(); // works
  echo API_KEY;  // Undefined constant
  </code></pre>