PHPackages                             gebruederheitz/simple-singleton - 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. gebruederheitz/simple-singleton

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

gebruederheitz/simple-singleton
===============================

A simple implementation of a singleton as an extensible abstract class or as a trait.

v1.0.1(4y ago)01.6k↓50%9GPL-3.0-onlyPHPPHP &gt;=7.3

Since Jul 5Pushed 4y ago2 watchersCompare

[ Source](https://github.com/gebruederheitz/simple-singleton)[ Packagist](https://packagist.org/packages/gebruederheitz/simple-singleton)[ RSS](/packages/gebruederheitz-simple-singleton/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (9)

Simple Singleton
================

[](#simple-singleton)

*A simple implementation of a singleton class in two flavours, ideal (and written for) Wordpress projects.*

---

The contained class is a near copy of the example used at , kudos to the author(s).

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

[](#installation)

```
> composer require gebruederheitz/simple-singleton
```

Usage
-----

[](#usage)

Extend the abstract class or use the trait. Your class' constructor needs to be protected.

Development
-----------

[](#development)

### Dependencies

[](#dependencies)

- PHP &gt;= 7.4
- [Composer 2.x](https://getcomposer.org)
- [NVM](https://github.com/nvm-sh/nvm) and nodeJS LTS (v16.x)
- Nice to have: GNU Make (or drop-in alternative)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Total

2

Last Release

1560d ago

PHP version history (2 changes)v1.0.0PHP ^7.3

v1.0.1PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2a201d58341e3ed71321bcb66cb375a8c6efffce7d8fe33244e821afc087c78?d=identicon)[mediocrity](/maintainers/mediocrity)

---

Top Contributors

[![AndreasMaros](https://avatars.githubusercontent.com/u/25008845?v=4)](https://github.com/AndreasMaros "AndreasMaros (8 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gebruederheitz-simple-singleton/health.svg)

```
[![Health](https://phpackages.com/badges/gebruederheitz-simple-singleton/health.svg)](https://phpackages.com/packages/gebruederheitz-simple-singleton)
```

###  Alternatives

[emreyarligan/enum-concern

A PHP package for effortless Enumeration handling with Laravel Collections 📦 ✨

21156.3k1](/packages/emreyarligan-enum-concern)[graze/supervisor

:vertical\_traffic\_light: Process supervisor for PHP.

999.3k](/packages/graze-supervisor)[burnbright/silverstripe-hasonefield

Edit a has\_one relationship using a GridField, triggered by clicking a button.

3439.9k1](/packages/burnbright-silverstripe-hasonefield)[joegreen0991/hyperloglog

A hyper log log with min hash data structure library, for counting cardinalities. Union and intersection capable

2116.5k](/packages/joegreen0991-hyperloglog)[arbermustafa/filament-google-charts-widgets

Chart widgets for Filament Php using Google Charts

147.4k](/packages/arbermustafa-filament-google-charts-widgets)

PHPackages © 2026

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