PHPackages                             vendor-patch/autoload-package - 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. vendor-patch/autoload-package

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

vendor-patch/autoload-package
=============================

This is forked from \[Wilkins/composer-file-loader\](https://github.com/Wilkins/composer-file-loader) to use it e.g. in the frdl/codebase ClassmapGenerator classes.

04PHP

Since Jan 31Pushed 3y agoCompare

[ Source](https://github.com/vendor-patch/autoload-package)[ Packagist](https://packagist.org/packages/vendor-patch/autoload-package)[ RSS](/packages/vendor-patch-autoload-package/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Autoloading zeugs from composer.json
====================================

[](#autoloading-zeugs-from-composerjson)

Forked from the original [Composer File Loader](https://github.com/Wilkins/composer-file-loader),

- add Classmap support and use it in the frdl/codebase lib.

====================

Allows you to load a composer.json file just as composer would do it.

This allows you to load composer.json file without composer (so, theoretically, PHP 5.2 is enough).

Support
-------

[](#support)

- PSR-4 : **YES**
- PSR-0 : **YES**
- Classmap : **NO**
- Files : **YES**

Usage
-----

[](#usage)

You have a composer.json file looking like this :

```
{
    "name": "wilkins/composer-file-loader",
    "type": "function",
    "description": "Load composer file",
    "autoload": {
        "psr-4": {
            "": "src2/",
            "RoutePlanner\\": "src/",
            "CompanyName\\PackageName\\": [
                "packages/package-folder/src/",
                "packages/package-folder1/src/"
            ]
        }
    }
}
```

```
// You load the PackageLoader
include __DIR__.'/PackageLoader.php';

// You load your packages
$loader = new PackageLoader\PackageLoader();
$loader->load(__DIR__."/vendor/project");

// You call the package classes
new CompanyName\PackageName\Machin();
new CompanyName\PackageName\Bidule();
new RoutePlanner\Truc();
new TestNoNamespace();
```

Testing
-------

[](#testing)

Just go into the root directory and run:

```
php test.php

```

If no error appears, you're good!

Contribution
------------

[](#contribution)

Created by Thibault Taillandier from [this stackoverflow question](https://stackoverflow.com/questions/39571391/psr4-auto-load-without-composer/39774973#39774973).

Please fork it to add more support

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/831c50002c08bb751b698844c98cd6b36897678268b47f1f872a30f4e192ac22?d=identicon)[webfan](/maintainers/webfan)

---

Top Contributors

[![wehowski](https://avatars.githubusercontent.com/u/2658030?v=4)](https://github.com/wehowski "wehowski (6 commits)")[![simon511000](https://avatars.githubusercontent.com/u/31013205?v=4)](https://github.com/simon511000 "simon511000 (4 commits)")[![Wilkins](https://avatars.githubusercontent.com/u/478570?v=4)](https://github.com/Wilkins "Wilkins (2 commits)")[![javaskript](https://avatars.githubusercontent.com/u/14116782?v=4)](https://github.com/javaskript "javaskript (1 commits)")

### Embed Badge

![Health badge](/badges/vendor-patch-autoload-package/health.svg)

```
[![Health](https://phpackages.com/badges/vendor-patch-autoload-package/health.svg)](https://phpackages.com/packages/vendor-patch-autoload-package)
```

###  Alternatives

[dmore/chrome-mink-driver

Mink driver for controlling chrome without selenium

7514.5M345](/packages/dmore-chrome-mink-driver)[kalessil/production-dependencies-guard

Prevents adding of development packages into require-section (should be require-dev).

851.2M2](/packages/kalessil-production-dependencies-guard)[nikic/include-interceptor

Intercept PHP includes

6967.4k2](/packages/nikic-include-interceptor)[artgris/maintenance-bundle

Symfony Bundle to place your Symfony website in maintenance mode

2697.5k](/packages/artgris-maintenance-bundle)[daveawb/understated

A PHP Finite State Machine for Laravel 5+

302.0k](/packages/daveawb-understated)[mediawiki/matomo

The Matomo (ex-Piwik) extension inserts your Matomo tracking code to the bottom of every page.

174.5k](/packages/mediawiki-matomo)

PHPackages © 2026

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