PHPackages                             syberisle/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. syberisle/filereflection

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

syberisle/filereflection
========================

Complements the PHP reflection API with the missing ReflectionFile class

1.3.0(4y ago)074[1 PRs](https://github.com/SyberIsle/filereflection/pulls)LGPL-3.0+PHPPHP &gt;=7.3CI passing

Since Jul 18Pushed 1y agoCompare

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

READMEChangelogDependencies (2)Versions (9)Used By (0)

syberisle/filereflection
========================

[](#syberislefilereflection)

[![Build Status](https://github.com/SyberIsle/filereflection/actions/workflows/tests.yml/badge.svg)](https://github.com/SyberIsle/filereflection/actions/workflows/tests.yml/badge.svg)

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

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

Install
-------

[](#install)

Via Composer

```
$ composer require syberisle/filereflection
```

Usage
-----

[](#usage)

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 SyberIsle\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.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Rasmus Schultz](https://github.com/mindplay-dk)
- [David Lundgren](https://github.com/dlundgren)
- [All Contributors](../../contributors)

License
-------

[](#license)

The LGPL 3.0+ License. Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~656 days

Total

5

Last Release

1696d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.0

1.3.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/5eb9bc1606754fee81247bf5d4a6a4d7fb7cce1b3769de69a345c5c8e120211e?d=identicon)[dlundgren](/maintainers/dlundgren)

---

Top Contributors

[![dlundgren](https://avatars.githubusercontent.com/u/1322393?v=4)](https://github.com/dlundgren "dlundgren (9 commits)")[![mindplay-dk](https://avatars.githubusercontent.com/u/103348?v=4)](https://github.com/mindplay-dk "mindplay-dk (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[bakame/laravel-domain-parser

Laravel package to integrate PHP Domain parser.

26534.8k4](/packages/bakame-laravel-domain-parser)

PHPackages © 2026

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