title: namespace autoloading with composer and PSR-0
body: <p>I want Implemente the namespace autoloading with composer and PSR-0, and I don't know why it dosen't work.</p>
  <p>there is my file structure:</p>
  <pre><code>src
     |app
         | world 
                | World.php
        
         | user
               | User.php
  vendor
  Test.php
  composer.json
  </code></pre>
  <p>in <strong>World.php</strong></p>
  <pre><code>&lt;?php
  
  namespace world;
  class World {
      public function hello() {
          return &quot;hello world&quot;;
      }
  }
  ?&gt;
  </code></pre>
  <p>in <strong>User.php</strong></p>
  <pre><code>&lt;?php
  namespace user; 
  class User {
      public function hello() {
          return &quot;hello user&quot;;
      }
  }
  ?&gt;
  </code></pre>
  <p>in <strong>composer.json</strong></p>
  <pre><code>{
      &quot;autoload&quot;: {
          &quot;psr-0&quot;: {
              &quot;my&quot;: &quot;src/app&quot;
          }
      }
  }
  </code></pre>
  <p>and when I test this in <strong>Test.php</strong> :</p>
  <pre><code>&lt;?php
  require 'vendor/autoload.php';
  
  class Myworld {
      public function testhello() {
          $w = new my\librairie\World();
          echo $w-&gt;hello();
          $u = new my\user\User();
          echo $u-&gt;hello();
      }
  }
  
  $m = new Myworld();
  $m-&gt;testhello();
  ?&gt;
  </code></pre>
  <p>I get this error :</p>
  <blockquote>
  <p>Fatal error: Class 'my\user\User' not found</p>
  <p>Fatal error: Class 'my\world\World' not found</p>
  </blockquote>
  <p>what I miss !? Any advice would be welcome! thanks.</p>