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(9mo ago)11.2k↓71.4%3BSD-3-ClausePHP

Since Feb 18Pushed 9mo 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 2w ago

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 87% of packages

Maintenance57

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity63

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

283d 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/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1321.1M84](/packages/silverstripe-userforms)[symbiote/silverstripe-gridfieldextensions

A collection of useful grid field components

981.9M265](/packages/symbiote-silverstripe-gridfieldextensions)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[silverstripe/tagfield

Tag field for SilverStripe

561.3M50](/packages/silverstripe-tagfield)[jonom/silverstripe-betternavigator

Front-end utility menu for Silverstripe websites featuring administration and development tools

59429.0k12](/packages/jonom-silverstripe-betternavigator)[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39317.0k29](/packages/lekoala-silverstripe-cms-actions)

PHPackages © 2026

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