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(4y ago)01.5k12MITPHPPHP ^8.0

Since Nov 21Pushed 3y 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 1w ago

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

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

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

1768d ago

Major Versions

1.0.3 → 2.0.02020-11-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/aea06607cc77b2887a1b343c87615c2d60aeb6c551f66f9c94a940e53dce28cf?d=identicon)[AdamHutchison](/maintainers/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

[elasticsearch/elasticsearch

PHP Client for Elasticsearch

5.3k178.3M943](/packages/elasticsearch-elasticsearch)[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[solarium/solarium

PHP Solr client

93532.7M98](/packages/solarium-solarium)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M65](/packages/opensearch-project-opensearch-php)[spatie/x-ray

Quickly scan source code for calls to Ray

80381.2k29](/packages/spatie-x-ray)[rollerworks/search-bundle

RollerworksSearch Bundle

1015.8k1](/packages/rollerworks-search-bundle)

PHPackages © 2026

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