PHPackages                             aaronholbrook/autoload - 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. aaronholbrook/autoload

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

aaronholbrook/autoload
======================

Automatically and recursively require\_once all files in a directory.

1.2(10y ago)1010.5k[1 issues](https://github.com/AaronHolbrook/autoload/issues)1MITPHP

Since Apr 7Pushed 9y agoCompare

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

READMEChangelog (3)DependenciesVersions (4)Used By (1)

Autoload [![Build Status](https://camo.githubusercontent.com/04a6401e835540397c7be48f0fbfe121fdbf99569c6f0d3cbd4430c5b06df392/68747470733a2f2f7472617669732d63692e6f72672f4161726f6e486f6c62726f6f6b2f6175746f6c6f61642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/AaronHolbrook/autoload)
==========================================================================================================================================================================================================================================================================================================

[](#autoload-)

Purpose
-------

[](#purpose)

Automatically load all PHP files in the specified directory. Recursively.

### Benefits

[](#benefits)

- Rename files with no fear of breaking `includes` or `require` calls
- Encourages using more files to more cleanly organize code into smaller logical chunks
- Reduce git merge conflicts with other developers

Usage
-----

[](#usage)

Install via composer by adding the [package](https://packagist.org/packages/aaronholbrook/autoload) to your composer file. `"aaronholbrook/autoload": "1.*",` does the trick.

Be sure to include the regular composer load file via `require( __DIR__ . '/vendor/autoload.php' );`.

Please note that although similarly named, this Autoload library is meant for loading all PHP files in a given directory. This does **NOT** function in the manner of the built-in PSR-4 PHP Autoloader.

Simply load your desired `includes` or whatever directory by calling:

```
\AaronHolbrook\Autoload\autoload( __DIR__ . 'includes' );

```

Caveats
-------

[](#caveats)

Since this is a recursive loader, you should be conscious of what you're placing in your autoloaded directory.

Things I wouldn't recommend doing:

- Placing a big (or any) PHP library in the autoloaded directory (this should/could be handled better with [composer](https://getcomposer.org/) anyways!)
- Being lax with permissions on a server. Obviously this is never a good idea, but I would be sure that your folder / file permissions are up to snuff (or strange files may be loaded)

Disclaimer
----------

[](#disclaimer)

Be aware that this may not be the right choice for your project. Please be fully aware of what this plugin does and how it works.

References
----------

[](#references)

- [Video Walkthrough](https://www.youtube.com/watch?v=NZtwcdIcHZ4)
- [Packagist](https://packagist.org/packages/aaronholbrook/autoload)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

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

Total

3

Last Release

4001d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/19a27d6ffc6af2748430f703f31e7e5224bff515c1645cda1ce24a13f45c5eaa?d=identicon)[aaronholbrook](/maintainers/aaronholbrook)

---

Top Contributors

[![AaronHolbrook](https://avatars.githubusercontent.com/u/953022?v=4)](https://github.com/AaronHolbrook "AaronHolbrook (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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