composer/composer — Issue #74: Remove ClassLoader and generate a map
Author: fabpot
Created: 2011-10-30 09:19:01+00:00
State: open

Composer comes with a simple implementation of an autoloader and I think it's a mistake. Composer should only be about packages, their dependencies, and their installation.

First, because it is a stripped down version of a "good" autoloader (there is no PEAR support for instance) and then, because I'm convinced that you will soon enough add all the features already available in the Symfony class loader (see composer/composer#73).

Instead, I propose to just generate a map that can be used as a configuration for any autoloader you want to use:

// autoload.php
return array(
'psr-0' => array(
array(
'mapping' => array('Monolog' => 'src/'),
'path' => 'vendor/monolog/monolog',
),
),
);

or something like that.