Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/nextras/composer-autoload-simplifier

Simplifies autoloader generated by Composer
https://github.com/nextras/composer-autoload-simplifier

Last synced: 3 months ago
JSON representation

Simplifies autoloader generated by Composer

Awesome Lists containing this project

README

        

Nextras Composer Autoload Simplifier
====================================

[![Downloads this Month](https://img.shields.io/packagist/dm/nextras/composer-autoload-simplifier.svg)](https://packagist.org/packages/nextras/composer-autoload-simplifier)
[![Stable version](http://img.shields.io/packagist/v/nextras/composer-autoload-simplifier.svg)](https://packagist.org/packages/nextras/composer-autoload-simplifier)

Nextras Composer Autoload Simplifier is a Composer plugin which can replace `vendor/autoload.php` with a simplified and therefore slightly faster version.

### Installation

Use composer:

```console
$ composer require nextras/composer-autoload-simplifier
```

### Example of Simplified Autoloader

```php
__DIR__ . '/tracy/tracy/src/Tracy/Bar.php',
'Tracy\\BlueScreen' => __DIR__ . '/tracy/tracy/src/Tracy/BlueScreen.php',
...
];

if (isset($classMap[$className])) {
$requireClassScoped($classMap[$className]);
}
});

$requireFileScoped('7745382c92b7799bf1294b1f43023ba2', __DIR__ . '/tracy/tracy/src/shortcuts.php');
})();
```

### License

MIT. See full [license](license.md).