PHPackages                             djmattyg007/autocodeloader - 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. djmattyg007/autocodeloader

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

djmattyg007/autocodeloader
==========================

Generate utility classes such as proxies and factories automatically.

1.0.0(9y ago)018UnlicensePHPPHP ~7.0.7

Since May 29Pushed 9y ago1 watchersCompare

[ Source](https://github.com/djmattyg007/AutoCodeLoader)[ Packagist](https://packagist.org/packages/djmattyg007/autocodeloader)[ RSS](/packages/djmattyg007-autocodeloader/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (5)Used By (0)

```
AutoCodeLoader

This project will automatically generate standardised factories, proxies and
setter traits, to avoid you having to duplicate this boilerplate constantly.
It also provides a reliable means for cache-busting autogenerated files and
the ability to pre-generate all files.

AutoCodeLoader will automatically generate the following kinds of files:

- Factories - \MyNamespace\MyPackage\MyClassFactory
- Proxies - \MyNamespace\MyPackage\MyClassProxy, \MyNamespace\MyPackage\MyInterfaceProxy
- Shared Proxies - \MyNamespace\MyPackage\MyClassSharedProxy, \MyNamespace\MyPackage\MyInterfaceSharedProxy
- Setter Traits - \MyNamespace\MyPackage\NeedsMyClassFactoryTrait

Some notes:

- Shared proxies will retrieve services from the dependency injection
  container, meaning all usages of the same shared proxy will deal with the
  same instance of the requested service.
- It is possible to autogenerate setter traits for autogenerated factories and
  proxies, as the above example implies.

To use this in production systems, you're going to want to pre-generate all
files. Pre-generating all files gives you the ability to exclude this package
entirely from your deployments, giving you the peace of mind that no
autogeneration is occurring in production systems. To be able to use the files
generated by this package when it isn't present, you simply need to bootstrap
the composer autoloader like so:

  $composer = require("/path/to/vendor/autoload.php");
  if (class_exists("\\MattyG\\AutoCodeLoader\\Autoloader") === true) {
      \MattyG\AutoCodeLoader\Autoloader::registerAutoloader("/path/to/generated/files");
  } else {
      $composer->addPsr4("", "/path/to/generated/files");
  }

This package makes quite a few assumptions at the moment:

- It will only generate proxies and factories designed to work with the Aura.Di
  dependency injection container. Support for other dependency injection
  containers is most welcome, but I do not have time to build this support at
  the moment.
- There is no magic with the setter traits - it relies on you using them,
  and/or configuring them for use within your dependency injection container.

In conclusion:

I built this because I was unable to find something simple that wasn't weighed
down by many dependencies, and that had first-class support for PHP7. Nothing
else was as simple as what I needed and was able to work with the Aura.Di
container, which is my personal preference.

You should not depend on this library if you are writing a library yourself!
That would be like depending on Illuminate\Support, which is a bad idea. This
library is designed solely for use within applications where a large amount
of code is being written. Do not burden your users with unnecessary
dependencies!

This software is released into the public domain without any warranty.
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Total

4

Last Release

3601d ago

Major Versions

0.2.2 → 1.0.02016-07-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/29e8622a72b856256e1b0f9e5ba9480444c6391e6e80a48eeb52fc4118eacf06?d=identicon)[djmattyg007](/maintainers/djmattyg007)

---

Top Contributors

[![djmattyg007](https://avatars.githubusercontent.com/u/489338?v=4)](https://github.com/djmattyg007 "djmattyg007 (25 commits)")

### Embed Badge

![Health badge](/badges/djmattyg007-autocodeloader/health.svg)

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

###  Alternatives

[nilportugues/php_backslasher

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

889.3k18](/packages/nilportugues-php-backslasher)[enlitepro/zf2-scaffold

1022.5k3](/packages/enlitepro-zf2-scaffold)

PHPackages © 2026

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