PHPackages                             almostanything/dependency-graph - 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. almostanything/dependency-graph

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

almostanything/dependency-graph
===============================

A simple dependency graph data structure

v1.0.0(11y ago)026PHPPHP &gt;=5.3.2

Since Jan 18Pushed 11y ago2 watchersCompare

[ Source](https://github.com/aaOss/dependency-graph)[ Packagist](https://packagist.org/packages/almostanything/dependency-graph)[ RSS](/packages/almostanything-dependency-graph/feed)WikiDiscussions master Synced 1mo ago

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

Dependency Graph
================

[](#dependency-graph)

A dependency graph data structure.

Usage
-----

[](#usage)

Basic Usage

```
use AlmostAnything\DependencyGraph\DependencyGraphNode as Node;

$jq = new Node('jquery.js');
$bs = new Node('bootstrap.js');
$dp = new Node('datepicker.js');

$jq->addChild($bs);
$dp->addParents($bs, $jq);

$graph = $jq->getGraph();             // returns an instance of DependencyGraph
var_dump($graph->topologicalSort());
```

Dependency Graphs can be disconnected so you may want to provide a DependencyGraph instance.

```
use AlmostAnything\DependencyGraph\DependencyGraphNode as Node;
use AlmostAnything\DependencyGraph\DependencyGraph as Graph;

$graph = new Graph();

$jq = new Node('jquery.js', $graph);
$pt = new Node('prototype.js', $graph);

$jq->addChild(new Node('bootstrap.js'));      // $graph will be automatically set on child
$pt->addChild(new Node('pt-typeahead.js');
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

4121d ago

Major Versions

v0.1.0-beta2 → v1.0.02015-02-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/325f35307c8da6b6c0719c124953d367339e861e02e3e1b130621bd23779c9c6?d=identicon)[startDaemons](/maintainers/startDaemons)

---

Top Contributors

[![rhysemmerson](https://avatars.githubusercontent.com/u/2549415?v=4)](https://github.com/rhysemmerson "rhysemmerson (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/almostanything-dependency-graph/health.svg)

```
[![Health](https://phpackages.com/badges/almostanything-dependency-graph/health.svg)](https://phpackages.com/packages/almostanything-dependency-graph)
```

###  Alternatives

[mage-os/mageos-async-events

An event-driven flexible async events module that allows you to process any event asynchronously.

3018.7k5](/packages/mage-os-mageos-async-events)

PHPackages © 2026

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