So - I have a simple PCR0 auto-loader in my bootstrap.php, that should load any PCR0 compatible library class from vendors directory...
spl_autoload_register( function( $classname ) {
$path = preg_match( '/\\\\/', $classname )
? str_replace( '\\', DIRECTORY_SEPARATOR, $classname )
: str_replace( '_', DIRECTORY_SEPARATOR, $classname );
$file = VENDORS_PATH . DIRECTORY_SEPARATOR . $path . '.php';
if ( file_exists( $file ) ) {
require_once( $file );
}
});
I'm not sure if I understand why composer generates auto-loading files in vendors directory (namely composer directory and autoload.php file) ?
Can I stop Composer from generating those auto-loader files? or am I missing something? I don't think I need them?