PHPackages                             koriym/psr4list - 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. koriym/psr4list

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

koriym/psr4list
===============

Returns the name of the classes in PSR4 path

1.4.0(6mo ago)0603.1k↓15.3%3MITPHPPHP &gt;=7.0CI passing

Since Dec 7Pushed 6mo ago2 watchersCompare

[ Source](https://github.com/koriym/Koriym.Psr4List)[ Packagist](https://packagist.org/packages/koriym/psr4list)[ RSS](/packages/koriym-psr4list/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (1)Versions (10)Used By (3)

Koriym.Psr4List
===============

[](#koriympsr4list)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f4b547493f29f639cf36f16e2d9a0dfc2cb20dba857dc6f740b99e92235208f8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b6f7269796d2f4b6f7269796d2e507372344c6973742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/koriym/Koriym.Psr4List/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/101a7a2ed3b11a590d47ef7e24dd4edf91ca904a7ee9183c4f7d0f6a3006972d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b6f7269796d2f4b6f7269796d2e507372344c6973742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/koriym/Koriym.Psr4List/?branch=master)[![Continuous Integration (legacy)](https://github.com/koriym/Koriym.Psr4List/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/koriym/Koriym.Psr4List/actions/workflows/continuous-integration.yml)

`Koriym\Psr4List` is a simple library for retrieving a list of all classes and files corresponding to a specified namespace prefix and directory, based on the PSR-4 autoloading standard.

---

Installation
------------

[](#installation)

You can install the library via Composer:

```
composer require koriym/psr4list
```

---

Usage
-----

[](#usage)

Here’s a basic example of how to use `Koriym\Psr4List`:

```
use Koriym\Psr4List\Psr4List;

$list = new Psr4List;
$prefix = 'BEAR\Sunday'; // Namespace prefix
$path = __DIR__ . '/src'; // Corresponding directory

foreach ($list($prefix, $path) as list($class, $file)) {
    echo "Class: $class\n";
    echo "File: $file\n";
}
```

### Example Output

[](#example-output)

```
Class: BEAR\Sunday\Module\AppModule
File: /path/to/project/src/Module/AppModule.php
Class: BEAR\Sunday\Extension\Router\RouterInterface
File: /path/to/project/src/Extension/Router/RouterInterface.php

```

---

Features
--------

[](#features)

- **PSR-4 Compliant**: Works based on the PSR-4 autoloading standard.
- **Simple and Lightweight**: Minimal dependencies, easy to integrate into any project.
- **Flexible**: Perfect for enumerating classes within a specific namespace.

---

Use Cases
---------

[](#use-cases)

- Enumerate all classes under a specific namespace in your project.
- Verify the correspondence between classes and their files.
- Use as part of refactoring or code analysis tools.

---

License
-------

[](#license)

This library is licensed under the [MIT License](LICENSE).

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance66

Regular maintenance activity

Popularity36

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

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

Recently: every ~352 days

Total

9

Last Release

204d ago

PHP version history (2 changes)1.0.1PHP &gt;=5.5

1.2.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/db4fc75ffc631168d0d7143b6f2c24b1534dfb921212bd851c026c5cbbb1344d?d=identicon)[koriym](/maintainers/koriym)

---

Top Contributors

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

---

Tags

psr4

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/koriym-psr4list/health.svg)

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

###  Alternatives

[jenner/array_group_by

like mysql group by

438.0k](/packages/jenner-array-group-by)

PHPackages © 2026

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