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.7k↓53.3%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 today

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

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

1606d 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)")[![CVE42-chicken](https://avatars.githubusercontent.com/u/25008845?v=4)](https://github.com/CVE42-chicken "CVE42-chicken (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

[wcm/git-php-hooks

Write git hooks with PHP, organize them on a per-project base and automatically add them

6442.5k3](/packages/wcm-git-php-hooks)[xodigital/formerly

Craft Plugin that allows users to build their own forms and view form submissions

582.1k](/packages/xodigital-formerly)[adityadees/laravel-google-bard

A Laravel Package for Google Bard AI Chatbot

1611.2k](/packages/adityadees-laravel-google-bard)

PHPackages © 2026

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