PHPackages                             easyengine/autoload-splitter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. easyengine/autoload-splitter

AbandonedArchivedComposer-plugin

easyengine/autoload-splitter
============================

Composer plugin for splitting a generated autoloader into two distinct parts.

v1.0.1(5y ago)2445↓100%MITPHP

Since Mar 8Pushed 5y ago2 watchersCompare

[ Source](https://github.com/EasyEngine/autoload-splitter)[ Packagist](https://packagist.org/packages/easyengine/autoload-splitter)[ Docs](https://wp-cli.org)[ RSS](/packages/easyengine-autoload-splitter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (11)Used By (0)

EE Autoload Splitter Composer Plugin
====================================

[](#ee-autoload-splitter-composer-plugin)

This is a custom autoloader generator for [EE](https://easyengine.io) that generates two separate autoloaders that split up the autoloadable classes. This allows these independent groups of autoloadable classes to be registered at different times in the code execution path.

Base taken from: [WP-CLI Autoload Splitter](https://github.com/wp-cli/autoload-splitter)

Using the default settings, it will produce the following two files:

1. `vendor/autoload_framework.php`
2. `vendor/autoload_commands.php`

Usage
-----

[](#usage)

In your project's `composer.json`, require the `easyengine/autoload-splitter`, and then optionally add the `"extra"` as needed to customize default behavior:

```
{
    "require": {
        "easyengine/autoload-splitter": "^0.1"
    },
    "extra": {
        "autoload-splitter": {
            "splitter-logic": "WP_CLI\\AutoloadSplitter",
            "splitter-location": "php/WP_CLI/AutoloadSplitter.php",
            "split-target-prefix-true": "autoload_commands",
            "split-target-prefix-false": "autoload_framework"
        }
    }
}
```

After the next update/install, you will have both a `vendor/autoload_framework.php` and a `vendor/autoload_commands.php` file, that you can simply include and use to autoload the individual groups of classes as needed.

Valid "extra" Keys
------------------

[](#valid-extra-keys)

You can configure the Autoload Splitter by providing `"extra"` keys under the `"autoload-splitter"` root key.

- **`"splitter-logic"`** :

    Fully qualified class name of the class that contains the splitter logic. The class will be `__invoke()`d with two arguments, the fully qualified class name as well as the path to the class source file.
- **`"splitter-location"`**:

    Location of the splitter logic class source file. This is used to manually require the class file in case it was not available to the Composer plugin through autoloading.
- **`"split-target-prefix-true"`** :

    Prefix that is used to generate the autoload files that contain the classes that evaluated to `true` through the splitter logic.
- **`"split-target-prefix-false"`** :

    Prefix that is used to generate the autoload files that contain the classes that evaluated to `false` through the splitter logic.

Current Limitations
-------------------

[](#current-limitations)

### `"psr-0"` &amp; `"psr-4"` autoloaders

[](#psr-0--psr-4-autoloaders)

To be able to work on individual classes, this Composer plugin will transform all PSR-0 and PSR-4 autoloaders into class maps for the split autoloading functionality. This is similar to the `--optimized` switch when generating standard autoloaders. During development, you will need to re-run the autoload generation after making changes to class names or locations, so that the split autoloaders are updated.

To re-generate the autoloaders, just run `composer dump-autoload` from within the project's root.

### `"files"` autoloaders

[](#files-autoloaders)

The `"files"` autoloading section is actually not a real autoloader. These files are eagerly included when the autoloader is triggered, and so they are simply ignored for the purposes of this Composer plugin.

License
-------

[](#license)

This code is released under the MIT license.

For the full copyright and license information, please view the [`LICENSE`](LICENSE) file distributed with this source code.

###  Health Score

33

—

LowBetter than 74% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~194 days

Recently: every ~325 days

Total

8

Last Release

1992d ago

Major Versions

v0.1.5 → v1.0.02020-10-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/85d12e799d478a9ff2c22546fc96d056712b76e6895a6519dde4cb71fe80cb78?d=identicon)[easyengine](/maintainers/easyengine)

---

Top Contributors

[![schlessera](https://avatars.githubusercontent.com/u/83631?v=4)](https://github.com/schlessera "schlessera (12 commits)")[![mrrobot47](https://avatars.githubusercontent.com/u/25586785?v=4)](https://github.com/mrrobot47 "mrrobot47 (11 commits)")[![JPry](https://avatars.githubusercontent.com/u/871924?v=4)](https://github.com/JPry "JPry (2 commits)")[![daalderp](https://avatars.githubusercontent.com/u/6084166?v=4)](https://github.com/daalderp "daalderp (1 commits)")[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (1 commits)")

---

Tags

hacktoberfesthacktoberfest2020

### Embed Badge

![Health badge](/badges/easyengine-autoload-splitter/health.svg)

```
[![Health](https://phpackages.com/badges/easyengine-autoload-splitter/health.svg)](https://phpackages.com/packages/easyengine-autoload-splitter)
```

###  Alternatives

[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k67](/packages/humbug-box)[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M14](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M440](/packages/drupal-core-composer-scaffold)[roots/wordpress-core-installer

A Composer custom installer to handle installing WordPress as a dependency

4115.6M19](/packages/roots-wordpress-core-installer)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
