PHPackages                             hvasoares/commons - 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. hvasoares/commons

ActiveLibrary

hvasoares/commons
=================

my commons classes used in so many projects

1.0.5(12y ago)0733mplPHP

Since Jul 2Pushed 12y ago1 watchersCompare

[ Source](https://github.com/hvasoares/commons)[ Packagist](https://packagist.org/packages/hvasoares/commons)[ RSS](/packages/hvasoares-commons/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (6)Used By (3)

commons
=======

[](#commons)

Introduction
------------

[](#introduction)

This repository is a bag of the classes used in my other projects. The most important class is Registry. The class is inspired in the concept showed on martin's fowler book Patterns of Enterprise Application Architecture. The main reason for its existence is dependency injection, I need some place to put my dependencies and I dont' found any good and plain implementation of this in PHP.

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

[](#requirements)

- Php version 5.3

Instalation
-----------

[](#instalation)

You can use composer, see the composer file in the root of the project. Only version above 1.0.4 will be there.

Example of use
--------------

[](#example-of-use)

```
$top = new \hvasoares\commons\Registry();

$obj = new stdClass;

$top['someObject'] = $obj;

$obj == $top['someObject']; //will return true

$child = new \hvasoares\commons\Registry($top);

$child['someObject'] == $top['someObject']; //will return true

$newObj = new stdClass;

$child['someObject'] = $newObj;

$child['someObject'] == $top['someObject']; //will return false

$child['someObject] == $newObj; //will return true
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

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

Total

5

Last Release

4634d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/194ae01078f0ba32b6c9b4e717d1a9223373b88b6cfcba7e0310b4b42424e212?d=identicon)[hvasoares](/maintainers/hvasoares)

---

Top Contributors

[![hvasoares](https://avatars.githubusercontent.com/u/518496?v=4)](https://github.com/hvasoares "hvasoares (29 commits)")

### Embed Badge

![Health badge](/badges/hvasoares-commons/health.svg)

```
[![Health](https://phpackages.com/badges/hvasoares-commons/health.svg)](https://phpackages.com/packages/hvasoares-commons)
```

PHPackages © 2026

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