PHPackages                             koriym/param-reader - 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/param-reader

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

koriym/param-reader
===================

An annotation/attribute reader for method parameter

1.1.0(2y ago)11.3M↓19.8%12MITPHPPHP ^7.2 || ^8.0

Since Mar 7Pushed 2y ago2 watchersCompare

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

READMEChangelog (2)Dependencies (3)Versions (3)Used By (2)

Koriym.ParamReader
==================

[](#koriymparamreader)

This is a meta data reader to get attributes or annotations from method parameters.

Although [doctine/annotation](https://github.com/doctrine/annotations) cannot annotate method parameters, this reader treats annotations of properties with the same names as method parameters as method parameter metadata.

This is especially useful when you want to prepare metadata for injection.

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

[](#installation)

```
composer require koriym/param-reader

```

Getting Started
---------------

[](#getting-started)

```
$reader = new PramReader();
$user = $reader->getParametrAnnotation(new ReflectionParameter([Consumer::class, '__construct'], 'name'), User::class);
assert($user instanceof User);

$users = $reader->getParametrAnnotations(new ReflectionParameter([Consumer::class, '__construct'], 'name'));
assert($users[0] instanceof User);
assert($users[1] instanceof Foo);
```

The following two codes provide the same meta information.

```
class Consumer
{
    private $name;

    public function __construct(#[User, Foo] string $name) {
        $this->name = $name;
    }
}
```

```
class Consumer
{
    /**
     * @User
     * @Foo
     */
    private $name;

    public function __construct(string $name) {
        $this->name = $name;
    }
}
```

Related
-------

[](#related)

- [koriym/attributes](https://github.com/koriym/Koriym.Attributes)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

735d ago

### 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 (25 commits)")

---

Tags

annotationattributephp8

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/comment-bundle

This Bundle provides threaded comment functionality for Symfony applications

460751.2k5](/packages/friendsofsymfony-comment-bundle)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[koriym/attributes

An annotation/attribute reader

433.4M12](/packages/koriym-attributes)[hostnet/entity-tracker-component

Provides an event when a Tracked entity changes

16158.1k4](/packages/hostnet-entity-tracker-component)[gomachan46/state-machine

simple state machine with annotations for PHP, inspired by AASM known as a Ruby state machine.

1893.9k](/packages/gomachan46-state-machine)[hostnet/accessor-generator-plugin-lib

Generate get, set, add, remove methods on the fly.

10118.9k](/packages/hostnet-accessor-generator-plugin-lib)

PHPackages © 2026

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