title: Overwriting class via composer
body: <p>I'm using a composer Library, with lots of classes. There is one class (<strong>Alibrary\FileA</strong>) in this which doesn't do exactly what I want it to do.</p>
  
  <pre><code>namespace Alibrary;
  
  class FileA
  {
      public function sayHello()
      {
          echo 'hello';
      }
  }
  </code></pre>
  
  <p>So I've written a replacement called <strong>Mylibrary\FileB</strong>. As you can see it's so must better.</p>
  
  <pre><code>namespace MyLibrary;
  
  use \Alibrary\FileA;
  
  class FileB extends FileA
  {
      public function sayHello()
      {
          echo 'hi';
      }
  }
  </code></pre>
  
  <p>Is there any way to tell Composer to load <strong>FileB</strong> every time <strong>FileA</strong> is asked for? I just want to replace one class, basically for testing purposes. I don't want to create a whole new repo - I've looked at <a href="https://getcomposer.org/doc/04-schema.md#replace" rel="nofollow">https://getcomposer.org/doc/04-schema.md#replace</a> already.</p>
  
  <p>Is there something like this that I can do?</p>
  
  <pre><code>"classmap": [
      "\Alibrary\FileA": "MyLibrary\FileB"
  ],
  </code></pre>
  
  <p>Thanks.</p>