PHPackages                             synga/inheritance-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. synga/inheritance-finder

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

synga/inheritance-finder
========================

This package can find classes which are extended, implemented by a certain class or is using a certain trait.

1.0.9(10y ago)08651MITPHPPHP &gt;=5.4

Since Jan 19Pushed 10y ago1 watchersCompare

[ Source](https://github.com/synga-nl/inheritance-finder)[ Packagist](https://packagist.org/packages/synga/inheritance-finder)[ RSS](/packages/synga-inheritance-finder/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (3)Versions (15)Used By (1)

Inheritance Finder
==================

[](#inheritance-finder)

This package can find classes which are extended, implemented or is using a certain trait. It builds a cache and uses it to find the desired files.

\##Usage

```
$config = new \Synga\InheritanceFinder\File\FileConfig();
$config->setApplicationRoot(__DIR__);
$config->setCacheDirectory(__DIR__);

$inheritanceFinder = Synga\InheritanceFinder\InheritanceFinderFactory::getInheritanceFinder($config);
$inheritanceFinder->findExtends('SomeNamespace\OtherNamespacePath\Class');

```

It will now find all classes which inherit from class `SomeNamespace\OtherNamespacePath\Class` whithin your `ApplicationRoot` directory

\##Possible options:

- `findClass('full qualified namespace')` - Can locate a file with the given namespace in the given directory
- `findExtends('full qualified namespace')` - Can locate multiple classes which inherit from the given class in the given directory
- `findImplements('full qualified namespace')` - Can locate multiple classes which implement or inherit from the given interface in the given directory
- `findTraitUse('full qualified namespace')` - Can locate multiple classes which uses the given trait in the given directory
- `findMultiple('Classes [string or array of strings]', 'Interfaces [string or array of strings]', 'Traits [string or array of strings]')` - Can locate multiple classes at once, it uses the methods discribed above.

\##Acknowledgements:

- Right now this package cannot handle multiple classes in one file. I will try to fix this in the near future.
- The first run will be slow, because it is indexing all the files in your project root. I'm thinking off a manner to make it faster. I am planning of using react php for this so we can use multiple processes.
- Don't use this code in production (you can use it FOR production, to build a cache of files). The performance results are strongly depending your hardware.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 91.9% 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 ~8 days

Recently: every ~22 days

Total

14

Last Release

3705d ago

Major Versions

0.2.2 → 1.0.02016-02-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9086829?v=4)[Gabriel Barreto](/maintainers/Synga)[@synga](https://github.com/synga)

---

Top Contributors

[![rpouls](https://avatars.githubusercontent.com/u/2946593?v=4)](https://github.com/rpouls "rpouls (34 commits)")[![synga-nl](https://avatars.githubusercontent.com/u/16606813?v=4)](https://github.com/synga-nl "synga-nl (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/synga-inheritance-finder/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4753.9M23](/packages/coenjacobs-mozart)[phparkitect/phparkitect

Enforce architectural constraints in your PHP applications

9184.1M24](/packages/phparkitect-phparkitect)[brianhenryie/strauss

Prefixes dependencies namespaces so they are unique to your plugin

190406.5k30](/packages/brianhenryie-strauss)[drupal-code-builder/drupal-code-builder

Code generator for Drupal

27249.5k1](/packages/drupal-code-builder-drupal-code-builder)[friendsoftypo3/content-blocks

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

101466.4k45](/packages/friendsoftypo3-content-blocks)

PHPackages © 2026

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