PHPackages                             hediet/type-reflection - 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. hediet/type-reflection

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

hediet/type-reflection
======================

A library which provide classes to reflect php types in an unified way.

v0.1.2(11y ago)1831MITPHPPHP &gt;=5.3.0

Since Mar 14Pushed 11y agoCompare

[ Source](https://github.com/hediet/php-type-reflection)[ Packagist](https://packagist.org/packages/hediet/type-reflection)[ RSS](/packages/hediet-type-reflection/feed)WikiDiscussions master Synced today

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

PHP Type Reflection
===================

[](#php-type-reflection)

This library provides classes to reflect php types in an unified way.

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

[](#installation)

You can use [Composer](http://getcomposer.org/) to download and install PHP Type Reflection. To add PHP Type Reflection to your project, simply add a dependency on hediet/type-reflection to your project's `composer.json` file.

Here is a minimal example of a `composer.json` file that just defines a dependency on PHP Type Reflection:

```
{
    "require": {
        "hediet/type-reflection": "^0.1.2"
    }
}
```

Usage
-----

[](#usage)

### Static Methods of the Type Class

[](#static-methods-of-the-type-class)

There are several static methods to get a type instance:

```

```

### Methods of the Type Class

[](#methods-of-the-type-class)

There are several methods defined for type instances:

```

```

### MethodInfo, ParameterInfo, ResultInfo and PropertyInfo

[](#methodinfo-parameterinfo-resultinfo-and-propertyinfo)

Alls these info classes provide type information and a description by parsing the php doc comments.

### Examples

[](#examples)

```

```

Class Diagram
-------------

[](#class-diagram)

[![class diagram](docs/class-diagram.png)](docs/class-diagram.png)

TODO
----

[](#todo)

- Add support for FunctionInfo.
    This requires to parse the use statements manually, as the StaticReflectionParser does not support reflecting functions.
- Add support for generic classes, methods and functions (like [this](https://gist.github.com/mvriel/3823010)).
- Enable reflecting types which are not loaded.

Author
------

[](#author)

Henning Dieterichs -

License
-------

[](#license)

PHP Expect is licensed under the MIT License.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

Total

3

Last Release

4120d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bbf4a94e3658e3567154235723a15a30433f80e2af8049619cb30248e8821ac?d=identicon)[Henning Dieterichs](/maintainers/Henning%20Dieterichs)

---

Top Contributors

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

---

Tags

typereflectionclassmetadataruntimeprimitive

### Embed Badge

![Health badge](/badges/hediet-type-reflection/health.svg)

```
[![Health](https://phpackages.com/badges/hediet-type-reflection/health.svg)](https://phpackages.com/packages/hediet-type-reflection)
```

###  Alternatives

[phpdocumentor/reflection

Reflection library to do Static Analysis for PHP Projects

12525.9M148](/packages/phpdocumentor-reflection)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[oat-sa/tao-core

TAO core extension

66143.7k124](/packages/oat-sa-tao-core)[minime/annotations

The KISS PHP annotations library

233390.7k38](/packages/minime-annotations)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k19](/packages/solspace-craft-freeform)[raphhh/trex-reflection

Reflection helpers for callables and types

14345.1k11](/packages/raphhh-trex-reflection)

PHPackages © 2026

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