PHPackages                             rooc/psr4\_auto\_loader - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. rooc/psr4\_auto\_loader

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

rooc/psr4\_auto\_loader
=======================

Implementation of the PSR-4 autoloading standard

v2.0.1(9y ago)018MITPHPPHP &gt;=7.1

Since Jun 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/roocster/psr4_auto_loader)[ Packagist](https://packagist.org/packages/rooc/psr4_auto_loader)[ RSS](/packages/rooc-psr4-auto-loader/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

PSR4AutoLoader
==============

[](#psr4autoloader)

Implementation of the [PSR-4 autoloading standard](http://www.php-fig.org/psr/psr-4/).

[![Minimum PHP Version](https://camo.githubusercontent.com/824c5c4ccb56537db3b3b53bb43d7b8edc6286f3b3d1705525e0821dfd22d27e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://opensource.org/licenses/MIT)[![Version](https://camo.githubusercontent.com/769c3bd709953923504bd66855f693ede5bf892648113f2be73027f565fdb807/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d322e302d627269676874677265656e2e737667)](https://github.com/roocster/psr4_auto_loader/)

### Requirements

[](#requirements)

- PHP &gt;=7.1 (for PHP &gt;=5.6 support use [version 1.0](https://github.com/roocster/psr4_auto_loader/tree/v1))
- PHPUnit &gt;=5.7 (for running tests)

### Installation

[](#installation)

Via [Composer](https://getcomposer.org/):

```
composer require "rooc/psr4_auto_loader"
```

### Usage

[](#usage)

For example, in the project root we have "src" folder that contains our own code of classes, interfaces, traits etc. Let's load all of them:

```
$autoLoader = new \Rooc\PSR4AutoLoader\PSR4AutoLoader('./src', 'App');
$autoLoader->register();
```

If your code are in several directories, e. g. "Classes" and "Interfaces", you need register both:

```
use Rooc\PSR4AutoLoader\PSR4AutoLoader;

// Load classes
(new PSR4AutoLoader('./Classes', 'App'))->register();

// Load interfaces
(new PSR4AutoLoader('./Interfaces', 'App'))->register();
```

> Note that you should follow the PSR-4 class naming rules:

License
-------

[](#license)

MIT

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

3305d ago

Major Versions

v1.x-dev → v2.0.12017-06-12

PHP version history (2 changes)v1.0.1PHP &gt;=5.6

v2.0.1PHP &gt;=7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6066648?v=4)[Ilya Rooc](/maintainers/roocster)[@roocster](https://github.com/roocster)

---

Top Contributors

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

---

Tags

autoloadingPSR-4

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rooc-psr4-auto-loader/health.svg)

```
[![Health](https://phpackages.com/badges/rooc-psr4-auto-loader/health.svg)](https://phpackages.com/packages/rooc-psr4-auto-loader)
```

###  Alternatives

[evilfreelancer/routeros-api-php

Modern Mikrotik RouterOS API PHP client for your applications (with Laravel support)

494241.4k5](/packages/evilfreelancer-routeros-api-php)[icamys/php-sitemap-generator

Simple PHP sitemap generator.

175356.9k7](/packages/icamys-php-sitemap-generator)[aura/autoload

Provides a PSR-4 compliant autoloader implementation.

94501.6k12](/packages/aura-autoload)[genert/bbcode

BBCode parser from or to HTML.

80331.6k1](/packages/genert-bbcode)[suin/phpcs-psr4-sniff

PHP\_CodeSniffer sniff that checks class name matches PSR-4 project structure.

271.9M18](/packages/suin-phpcs-psr4-sniff)[yidas/codeigniter-psr4-autoload

CodeIgniter 3 PSR-4 Autoloader for Application

5420.2k3](/packages/yidas-codeigniter-psr4-autoload)

PHPackages © 2026

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