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 2mo ago

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 75% 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

3778d ago

Major Versions

0.4.0 → 1.0.02016-01-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/a23ef4b72b21667ac62fd7c433032c6b82afa692e93738be3d02670d031588f2?d=identicon)[mattwellss](/maintainers/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

[composer/satis

Simple Repository Generator

3.3k1.4M17](/packages/composer-satis)[roave/backward-compatibility-check

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

5953.3M56](/packages/roave-backward-compatibility-check)[magento/magento-composer-installer

Composer installer for Magento modules

7523.3M318](/packages/magento-magento-composer-installer)[larapack/hooks

A Laravel Hook system

2171.5M21](/packages/larapack-hooks)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.2M122](/packages/ramsey-conventional-commits)[dominikb/composer-license-checker

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

563.8M9](/packages/dominikb-composer-license-checker)

PHPackages © 2026

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