PHPackages                             fromholdio/silverstripe-commonancestor - 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. fromholdio/silverstripe-commonancestor

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

fromholdio/silverstripe-commonancestor
======================================

A small utility class that accepts an array of class name, compares their class ancestories, and identifies their closest common ancestor class.

1.2.0(7mo ago)11.2k↓66.7%3BSD-3-ClausePHP

Since Feb 18Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/fromholdio/silverstripe-commonancestor)[ Packagist](https://packagist.org/packages/fromholdio/silverstripe-commonancestor)[ Docs](https://github.com/fromholdio/silverstripe-commonancestor)[ RSS](/packages/fromholdio-silverstripe-commonancestor/feed)WikiDiscussions master Synced yesterday

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

silverstripe-commonancestor
===========================

[](#silverstripe-commonancestor)

A small utility class that accepts an array of class name, compares their class ancestories, and identifies their closest common ancestor class.

Class is pretty well commented, jumping into it should answer any initial questions.

Requirements
------------

[](#requirements)

SilverStripe 4, 5, 6

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

[](#installation)

`composer require fromholdio/silverstripe-commonancestor`

(Contrived) Example
-------------------

[](#contrived-example)

Assuming a page class hierarchy of:

- SiteTree
    - Page
    - BlogHolder
    - BlogPost
        - ArticlePost
        - VideoPost

```
$exampleOne = [VideoPost::class, ArticlePost::class];
$resultOne = CommonAncestor::get_closest($exampleOne);
// returns 'BlogPost'

$exampleTwo = [VideoPost::class, BlogPost::class];
$resultTwo = CommonAncestor::get_closest($exampleTwo);
// returns 'BlogPost'

$exampleThree = [VideoPost::class, BlogHolder::class];
$resultThree = CommonAncestor::get_closest($exampleThree);
// returns 'Page'
```

The `get_closest` function also accepts a second argument, which allows you to include/exclude classes that have tables (`$tablesOnly`; set to `false` by default).

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance62

Regular maintenance activity

Popularity18

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

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

Total

3

Last Release

234d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/40e135ad117686bee39707c1d9286cc5e915e219c26a10d13858ca44d14f1eb0?d=identicon)[dizzystuff](/maintainers/dizzystuff)

---

Top Contributors

[![dizzystuff](https://avatars.githubusercontent.com/u/576903?v=4)](https://github.com/dizzystuff "dizzystuff (5 commits)")

---

Tags

silverstripehierarchyancestor

### Embed Badge

![Health badge](/badges/fromholdio-silverstripe-commonancestor/health.svg)

```
[![Health](https://phpackages.com/badges/fromholdio-silverstripe-commonancestor/health.svg)](https://phpackages.com/packages/fromholdio-silverstripe-commonancestor)
```

###  Alternatives

[silverstripe/multi-domain

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy

141.6k](/packages/silverstripe-multi-domain)

PHPackages © 2026

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