soyhuce/classmap-generator

A simple classmap generator extracted from composer

Fund package maintenance!
soyhuce

1.1.0 2024-02-16 14:10 UTC

README

Latest Version on Packagist Tests Total Downloads

Generates classmap without composer.

\Soyhuce\ClassMapGenerator\ClassMapGenerator::createMap(__DIR__ . '/src'); 
// [
//   'Soyhuce\\ClassmapGenerator\\ClassmapGenerator' => '/code/soyhuce/classmap-generator/src/ClassmapGenerator.php',
//   'Soyhuce\\ClassmapGenerator\\PhpFileCleaner' => '/code/soyhuce/classmap-generator/src/PhpFileCleaner.php',
//   'Soyhuce\\ClassmapGenerator\\Util\\Silencer' => '/code/soyhuce/classmap-generator/src/Util/Silencer.php',
//   'Soyhuce\\ClassmapGenerator\\Util\\Filesystem' => '/code/soyhuce/classmap-generator/src/Util/Filesystem.php',
//   'Soyhuce\\ClassmapGenerator\\Util\\Platform' => '/code/soyhuce/classmap-generator/src/Util/Platform.php',
//   'Soyhuce\\ClassmapGenerator\\Pcre\\Preg' => '/code/soyhuce/classmap-generator/src/Pcre/Preg.php',
//   'Soyhuce\\ClassmapGenerator\\Pcre\\PcreException' => '/code/soyhuce/classmap-generator/src/Pcre/PcreException.php',
// ]

Installation

You can install the package via composer:

composer require soyhuce/classmap-generator

Usage

\Soyhuce\ClassMapGenerator\ClassMapGenerator::createMap($path); 

It will generate the classmap for the given path.

The classmap is identical to the one generated by composer.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

All credit should go to Composer, this package is just an extraction of the ClassmapGenerator class from Composer.

License

The MIT License (MIT). Please see License File for more information.