This library generates classmap for autoload.
NOTE: This code is based on ClassMapGenerator from symfony/class-loader component.
composer require piotrpress/classmap
require __DIR__ . '/vendor/autoload.php';
use PiotrPress\Classmap;
$classmap = new Classmap( __DIR__ . '/vendor' );
// return array
$classmap->get();
// save to file
$classmap->dump( __DIR__ . '/vendor/classmap.php' );