PHPackages                             flexic/attribute-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. flexic/attribute-reader

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

flexic/attribute-reader
=======================

Provides an reader for php attributes.

1.2.0(3y ago)1166MITPHPPHP ^8.1

Since Oct 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/flexicsystems/attribute-reader)[ Packagist](https://packagist.org/packages/flexic/attribute-reader)[ RSS](/packages/flexic-attribute-reader/feed)WikiDiscussions main Synced yesterday

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

📖 Attribute Reader
------------------

[](#-attribute-reader)

Reader to get attributes from a class, method or property.

---

### Installation

[](#installation)

Run

```
composer require flexic/attribute-reader
```

to install `flexic/attribute-reader`.

---

### Get Attributes

[](#get-attributes)

```
$reflectionClass = new \ReflectionClass(MyClass::class);

$attributeReader = new Flexic\Attributes\Reader();

$attributeReader->getAttributes($reflectionClass); // Returns list of given attributes
$attributeReader->getAttribute($reflectionClass, MyAttribute::class); // Returns first attribute of given type
$attributeReader->hasAttribute($reflectionClass, MyAttribute::class); // Checks if attribute is defined on class.
$attributeReader->findClassesWithAttribute(MyAttribute::class); // Get all classes where Attribute is defined.
```

---

### License

[](#license)

This package is licensed using the GNU License.

Please have a look at [LICENSE.md](LICENSE.md).

---

[![Donate](https://camo.githubusercontent.com/b57c445af971e3e99c2d0ccdbf4fa7faa4358ba27fecc8f68459b30289f82eda/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d626c75652e737667)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q98R2QXXMTUF6&source=url)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Total

3

Last Release

1351d ago

### Community

Maintainers

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

---

Top Contributors

[![ThemePoint](https://avatars.githubusercontent.com/u/28843201?v=4)](https://github.com/ThemePoint "ThemePoint (22 commits)")

---

Tags

readerattributes

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/flexic-attribute-reader/health.svg)

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

###  Alternatives

[jetbrains/phpstorm-attributes

PhpStorm specific attributes

41517.6M828](/packages/jetbrains-phpstorm-attributes)[spatie/php-attribute-reader

A clean API for working with PHP attributes

891.4M17](/packages/spatie-php-attribute-reader)[crell/attributeutils

A robust, flexible attribute handling framework

101515.9k11](/packages/crell-attributeutils)[spiral/attributes

PHP attributes reader

244.4M67](/packages/spiral-attributes)[psalm/attributes

A collection of PHP 8 Attributes that Psalm can understand

19122.3k2](/packages/psalm-attributes)[vanilo/properties

Vanilo Properties (Attributes) Module

11153.7k3](/packages/vanilo-properties)

PHPackages © 2026

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