PHPackages                             mindplay/filereflection - 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. mindplay/filereflection

Abandoned → [roave/better-reflection](/?search=roave%2Fbetter-reflection)ArchivedLibrary

mindplay/filereflection
=======================

Complements the PHP reflection API with the missing ReflectionFile class

1.2.1(10y ago)26521[1 issues](https://github.com/mindplay-dk/filereflection/issues)2LGPL-3.0+PHPPHP &gt;=5.3.0

Since Jul 18Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (5)Used By (2)

mindplay/filereflection
=======================

[](#mindplayfilereflection)

#### ⚠️ DEPRECATED ⚠️

[](#️-deprecated-️)

> Consider using [`Roave/BetterReflection`](https://github.com/Roave/BetterReflection) instead.

This library complements the PHP [reflection API](http://dk1.php.net/manual/en/book.reflection.php) with the missing ReflectionFile class.

[![Build Status](https://camo.githubusercontent.com/2d955fdd0f86a4c0efa1109d9f670b707549bff3ab1b7ab097f1dd1c3c9caf37/68747470733a2f2f7472617669732d63692e6f72672f6d696e64706c61792d646b2f66696c657265666c656374696f6e2e706e67)](https://travis-ci.org/mindplay-dk/filereflection)

A few other libraries were available to do this already, but this one implements an important feature missing from other implementations I could find: resolution of local type-names according to the [name resolution rules](http://php.net/manual/en/language.namespaces.rules.php).

The interface is very simple:

```
ReflectionFile {

    public __construct( string $path )

    public string getPath ( void )
    public string getNamespaceName ( void )
    public string resolveName ( string $name )
    public ReflectionClass getClass ( string $name )
    public ReflectionClass[] getClasses ( void )

}

```

Usage of course is straight forward too:

```
use mindplay\filereflection\ReflectionFile;

$file = new ReflectionFile('/path/to/MyNamespace/MyClass.php');

var_dump($file->resolveName('MyOtherClass')); // => '\MyNamespace\MyOtherClass'

```

Note that this library currently omits reflection/enumeration of functions, constants, etc.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

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

Total

4

Last Release

3988d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9445f567f43ee7a963270651e40e533634586f959e4df3d5398d001b1cb49be8?d=identicon)[mindplay.dk](/maintainers/mindplay.dk)

---

Top Contributors

[![mindplay-dk](https://avatars.githubusercontent.com/u/103348?v=4)](https://github.com/mindplay-dk "mindplay-dk (8 commits)")

### Embed Badge

![Health badge](/badges/mindplay-filereflection/health.svg)

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

PHPackages © 2026

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