PHPackages                             aeviiq/tree-node - 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. aeviiq/tree-node

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

aeviiq/tree-node
================

A library that provides the tree node functionality.

v1.0(2y ago)217.0k—0%2[3 issues](https://github.com/aeviiq/tree-node/issues)MITPHPPHP ^8.1

Since Sep 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aeviiq/tree-node)[ Packagist](https://packagist.org/packages/aeviiq/tree-node)[ Docs](https://github.com/aeviiq/tree-node)[ RSS](/packages/aeviiq-tree-node/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (7)Used By (0)

Aeviiq Tree Node
================

[](#aeviiq-tree-node)

A library that provides the tree node functionality.

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

[](#installation)

```
composer require aeviiq/tree-node

```

Declaration
-----------

[](#declaration)

```
// ...
use Aeviiq\TreeNode\TreeNodeTrait;

final class Foo implements FooBarInterface
{
    use TreeNodeTrait;

    // ...
}
```

Will provide the Foo class with the functionality to support the tree node structure:

[![Image description](tree_node_diagram.png)](tree_node_diagram.png)

Usage
-----

[](#usage)

```
$foo = new Foo();
$foo2 = new Foo();
$foo->addChild($foo2);

$foo->isRoot(); // true
$foo2->isRoot(); // false

$foo->isLeaf(); // false
$foo2->isLeaf(); // true
$foo2->getRoot() === $foo; // true
```

Notable mentions
----------------

[](#notable-mentions)

\*There is no 'protection' against the case where a node can become it's own grand parent|child. When this is the case, it could cause infinite recursion errors in methods such as getRoot(). Making a node its own grand parent or grand child is just a plain wrong usage of this tree node component, therefor it is not worth the performance decrease to recursively validate against.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% 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 ~315 days

Recently: every ~392 days

Total

6

Last Release

854d ago

Major Versions

v0.3 → 1.0.x-dev2024-01-15

PHP version history (3 changes)0.1-alphaPHP ^7.2

v0.2PHP ^7.2 || ^8.0

1.0.x-devPHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34397049?v=4)[aeviiq](/maintainers/aeviiq)[@aeviiq](https://github.com/aeviiq)

---

Top Contributors

[![aeviiq](https://avatars.githubusercontent.com/u/34397049?v=4)](https://github.com/aeviiq "aeviiq (16 commits)")[![LucasdeRijke](https://avatars.githubusercontent.com/u/107672588?v=4)](https://github.com/LucasdeRijke "LucasdeRijke (1 commits)")

---

Tags

phptreenodeaeviiqtree-node

### Embed Badge

![Health badge](/badges/aeviiq-tree-node/health.svg)

```
[![Health](https://phpackages.com/badges/aeviiq-tree-node/health.svg)](https://phpackages.com/packages/aeviiq-tree-node)
```

###  Alternatives

[loophp/phptree

An implementation of tree data structure

981.8M2](/packages/loophp-phptree)[efureev/laravel-trees

Multi-Tree structures for Laravel

14253.3k4](/packages/efureev-laravel-trees)[fab2s/nodalflow

A PHP Nodal WorkFlow

16362.4k1](/packages/fab2s-nodalflow)[zoon/rialto

Manage Node resources from PHP

12199.4k3](/packages/zoon-rialto)

PHPackages © 2026

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