title: Autload with composer from a file with classmaps
body: <p>In my project I use ezc components from PEAR. I want to move all dependency to composer so for it I've found <a href="https://github.com/lortnus/ezc" rel="nofollow">https://github.com/lortnus/ezc</a>. It's great, but I have a one problem - autoloading. There is an autoload folder with classmaps, but I don't have any clue how I can make composer's autoload to use them. Any idea how to do it?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've found two possible ways how to autoload these classes:
  - fork lortnus/etc and add autoload in composer.json
  - add autoload in composer.json in my project</p>
  
  <p>Setting a classmap autoloader for all ezc classes will produce a huge autoload_classmap file. I'm not sure, but it can hit a performance a bit. Because of that I take a second approach and it looks like this:</p>
  
  <pre><code>"classmap": [
      "vendor/lortnus/ezc/Base/src",
      "vendor/lortnus/ezc/Mail/src"
  ]
  </code></pre>
  
  <p>and instead of creating a classmap for whole ez Components I end up of with a classmap with classes that I need. I don't like setting path to vendor folder, but think that's the best possibility here. </p>