PHPackages                             mattwellss/magento-composer-autoloader - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mattwellss/magento-composer-autoloader

ActiveMagento-module[Utility &amp; Helpers](/categories/utility)

mattwellss/magento-composer-autoloader
======================================

1.0.2(10y ago)68321MITPHP

Since Mar 24Pushed 10y ago2 watchersCompare

[ Source](https://github.com/mattwellss/magento-composer-autoloader)[ Packagist](https://packagist.org/packages/mattwellss/magento-composer-autoloader)[ RSS](/packages/mattwellss-magento-composer-autoloader/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (2)Versions (9)Used By (0)

Magento Composer Autoloader
===========================

[](#magento-composer-autoloader)

Complete and simple to install Composer autoloader or Magento

Why Does This Even Exist?
-------------------------

[](#why-does-this-even-exist)

1. Other Composer autoloader integrations aren't complete. The most common issues with other implementations:

- They allow both Magento and Composer to register autoloaders. This causes problems when using libraries that expect `class_exists` to work properly—Magento's will **always** attempt to include the file.
- They allow Magento's autoload to register itself, then manually de-register it. This is wholly unnecessary overhead.
- They require manual configuration of `composer.json` for Magento autoloading.

2. With more and more need to integrate namespaced systems with Magento, a `require`-able, redistributable, easy to set up module is needed

Installation
------------

[](#installation)

Until it's listed in packagist or firegento, add the repository to your `composer.json`:

```
{
    "type": "vcs",
    "url": "https://github.com/mattwellss/magento-composer-autoloader"
}
```

Add the library to your `require` section:

```
"require": {
    "mattwellss/magento-composer-autoloader": "~1.0"
}
```

Configuration
-------------

[](#configuration)

Post install, the new `Varien_Autoload` class needs to know where `vendor/autoload.php` is hiding. This must be configured.

### Defining the vendor root directory

[](#defining-the-vendor-root-directory)

Regardless of how the vendor dir is defined, it **must not end with a trailing slash**.

The two methods of describing the vendor root directory are:

- `VENDOR_ROOT` constant. Must be defined *in all entry points*.
- `MAGE_VENDOR_ROOT` env variable. Be sure it's defined for **all** PHP environments (cli and fpm/mod\_php).

Optimizing the Autoloader
-------------------------

[](#optimizing-the-autoloader)

Normally, `composer dump -o` is all one does to optimize a composer autoloader. However, running `php shell/classmap_generator.php` when deploying new code to production is recommended. The script generates a classmap file to be used by composer to speed autoloading of files in Magento's code pools.

To enable use of the generated classmap, include `define('OPTIMIZED_COMPOSER', true)` in `includes/config.php`.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~41 days

Recently: every ~1 days

Total

8

Last Release

3828d ago

Major Versions

0.4.0 → 1.0.02016-01-05

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1776257?v=4)[Matthew Wells](/maintainers/mattwellss)[@mattwellss](https://github.com/mattwellss)

---

Top Contributors

[![KevinDonaldson](https://avatars.githubusercontent.com/u/7206317?v=4)](https://github.com/KevinDonaldson "KevinDonaldson (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mattwellss-magento-composer-autoloader/health.svg)

```
[![Health](https://phpackages.com/badges/mattwellss-magento-composer-autoloader/health.svg)](https://phpackages.com/packages/mattwellss-magento-composer-autoloader)
```

###  Alternatives

[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

6003.7M96](/packages/roave-backward-compatibility-check)[brianhenryie/strauss

Prefixes dependencies namespaces so they are unique to your plugin

190438.1k32](/packages/brianhenryie-strauss)[october/rain

October Rain Library

1601.7M78](/packages/october-rain)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M551](/packages/shopware-core)[dominikb/composer-license-checker

Utility to check for licenses of dependencies and block/allow them.

574.6M13](/packages/dominikb-composer-license-checker)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M335](/packages/drupal-core-dev)

PHPackages © 2026

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