Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/soyhuce/classmap-generator

A simple classmap generator extracted from composer
https://github.com/soyhuce/classmap-generator

Last synced: about 2 months ago
JSON representation

A simple classmap generator extracted from composer

Awesome Lists containing this project

README

        

# A simple classmap generator extracted from composer

[![Latest Version on Packagist](https://img.shields.io/packagist/v/soyhuce/classmap-generator.svg?style=flat-square)](https://packagist.org/packages/soyhuce/classmap-generator)
[![Tests](https://github.com/soyhuce/classmap-generator/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/soyhuce/classmap-generator/actions/workflows/run-tests.yml)
[![Total Downloads](https://img.shields.io/packagist/dt/soyhuce/classmap-generator.svg?style=flat-square)](https://packagist.org/packages/soyhuce/classmap-generator)

Generates classmap without composer.

```php
\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:

```bash
composer require soyhuce/classmap-generator
```

## Usage

```php
\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

```bash
composer test
```

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

All credit should go to [Composer](https://getcomposer.org/), this package is just an extraction of the ClassmapGenerator class from Composer.

- [composer/composer](https://github.com/composer/composer)
- [Bastien Philippe](https://github.com/bastien-phi)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.