PHPackages                             netsells/attribute-finder - 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. [Search &amp; Filtering](/categories/search)
4. /
5. netsells/attribute-finder

AbandonedArchivedLibrary[Search &amp; Filtering](/categories/search)

netsells/attribute-finder
=========================

A simple package that allows you to get all classes that have a given attribute in a specified directory

2.1.0(5y ago)01.5k12MITPHPPHP ^8.0

Since Nov 21Pushed 4y ago2 watchersCompare

[ Source](https://github.com/netsells/attribute-finder)[ Packagist](https://packagist.org/packages/netsells/attribute-finder)[ RSS](/packages/netsells-attribute-finder/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (11)Used By (2)

Attribute Finder
================

[](#attribute-finder)

Attribute finder privides an easy way of getting a list of classes that have a specific attribute within a specified directory. Attribute finder will return a `Generator` of `ReflectionClass` instances for each class found that contains the given attribute.

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

[](#installation)

using composer:

```
composer require netsells/attribute-finder

```

Usage
-----

[](#usage)

The `AttributeFinder` class needs to be initialised with the path to the directory you wish to scan. You can then call the `getClassesWithAttribute()` which takes a single argument of the attribute name you're trying to seach for. `getClassesWithAttribute()` will then return an `Generator` instance containing a `ReflectionClass` instance for each class that has the given attribute in the specified directory.

```
use Netsells\AttributeFinder\AttributeFinder;

$finder = new AttributeFinder(__DIR__);

$classes = $finder->getClassesWithAttribute(TestAttribute::class);
```

Once you have the `Generator` instance you are free to iterate over it and retrieve the attributes

```
foreach ($classes as $class) {
    $attribute = $class->getAttributes(TestAttribute::class)[0];
    $attributeInstance = $attribute->newInstance();
    // Do whatever you want with the given attribute instance
}
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

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

Recently: every ~58 days

Total

8

Last Release

1860d ago

Major Versions

1.0.3 → 2.0.02020-11-23

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26207661?v=4)[Adam Hutchison](/maintainers/AdamHutchison)[@AdamHutchison](https://github.com/AdamHutchison)

---

Top Contributors

[![NickSnellockNS](https://avatars.githubusercontent.com/u/76944386?v=4)](https://github.com/NickSnellockNS "NickSnellockNS (1 commits)")

---

Tags

searchattributes

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/netsells-attribute-finder/health.svg)

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

###  Alternatives

[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k257.3M12.4k](/packages/symfony-framework-bundle)[illuminate/filesystem

The Illuminate Filesystem package.

16166.4M3.5k](/packages/illuminate-filesystem)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19467.3M1.9k](/packages/drupal-core)[api-platform/symfony

Symfony API Platform integration

385.0M152](/packages/api-platform-symfony)[illuminate/session

The Illuminate Session package.

9939.9M887](/packages/illuminate-session)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103574.3k69](/packages/friendsoftypo3-content-blocks)

PHPackages © 2026

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