title: add a library to silex
body: <p>I know this question has already been asked, but it seems that autoloading process changed a little bit with composer.</p>
  
  <p>I just want to add a class library to my silex project.</p>
  
  <p>So I made this file:
  vendor\lib\picture.php</p>
  
  <pre><code>&lt;?php
  namespace MyNamespace;
  
  class Picture
  {
      function testage()
      {
          echo 'hihaaa ça marche'; exit;
      }
  }
  </code></pre>
  
  <p>in vendor/composer/autoload_namespaces.php, I added this line to the big array:</p>
  
  <pre><code>'MyNamespace' =&gt; $vendorDir . '/lib/',
  </code></pre>
  
  <p>And in the main file I added:</p>
  
  <pre><code>use MyNamespace\Picture as Picture;
  </code></pre>
  
  <p>and called it like that:</p>
  
  <pre><code>$app-&gt;register(new Picture());
  </code></pre>
  
  <p>which gives me this error:</p>
  
  <pre><code>Fatal error: Class 'MyNamespace\Picture' not found...
  </code></pre>
  
  <p>I just don't know how to add a class that I can use from any controller, easily, without command line (I don't use composer, I downloaded silex preconfigured), any idea?</p>