title: Override Composer autoloader
body: <h2>Background</h2>
  
  <p>I'm developing a series of websites which share a common engine. Something very similar to StackExchange's network of websites. Every webiste is a separate Symfony2 installation on a different Git repository, with a dependency to the engine, which is also placed on a separate repository.</p>
  
  <pre><code> "requires": {
       ...
       "my-platform/core": "dev-master"
   }
  </code></pre>
  
  <hr>
  
  <p>I'm still in the early stage of development, so I'd like not have to use <code>composer update</code> everytime I change something in the core repository. It seems that Composer has a right tool to solve this problem but it doesn't want to work properly.</p>
  
  <p>My directory structure:</p>
  
  <pre><code>Workspace
      MyPlatformCore
          src
              MyPlatform
                  Core
                      SomeClass.php
          composer.json
      MyWebsiteAAA
          app
          src
          vendor
          web
          composer.json
      MyWebsiteBBB
          app
          src
          vendor
          web
          composer.json
  </code></pre>
  
  <p>Autoload section from <code>composer.json</code> from every <code>MyWebsiteXXX</code> repository:</p>
  
  <pre><code>"autoload": {
      "psr-0": {
          "MyPlatform": "../MyPlatformCore/src"
      }
  },
  </code></pre>
  
  <h2>Problem</h2>
  
  <p>If i run <code>php composer.phar dumpautoload --optimize</code> from <code>MyWebsiteXXX</code> it generates files of autoloader with wrong paths. File <code>vendor/composer/autoload_classmap.php</code> contains:</p>
  
  <pre><code>'MyPlatform\\Core\\...' =&gt; $vendorDir . '/myplatform/core/src/MyPlatform/Core/...php',
  </code></pre>
  
  <p>while it should contain:</p>
  
  <pre><code>'MyPlatform\\Core\\...' =&gt; $vendorDir . '/../MyPlatformCore/src/MyPlatform/Core/...php',
  </code></pre>
  
  <p>P.S. <code>Workspace\MyPlatformCore</code> is in fact a symlink, but it should matter, isn't it?</p>