PHPackages                             chrisharrison/merged-container - 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. chrisharrison/merged-container

ActiveLibrary

chrisharrison/merged-container
==============================

A PSR-11 compliant container that merges a set of PSR-11 containers. You might call it a container container.

v1.1(8y ago)110MITPHPPHP ^7.1

Since Dec 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/chrisharrison/merged-container)[ Packagist](https://packagist.org/packages/chrisharrison/merged-container)[ RSS](/packages/chrisharrison-merged-container/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

merged-container
================

[](#merged-container)

[![Build Status](https://camo.githubusercontent.com/5d936a96a42d74fe822e0fcda927dc2434a788bdea2e41c2378c72d3d746edde/68747470733a2f2f7472617669732d63692e6f72672f63687269736861727269736f6e2f7068702d61727261792d6f662e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/chrisharrison/php-array-of)

A [PSR-11](http://www.php-fig.org/psr/psr-11/) compliant container that merges a set of PSR-11 containers. You might call it a container container.

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

[](#requirements)

Requires PHP 7.1

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

[](#installation)

Through Composer, obviously:

```
composer require chrisharrison/merged-container

```

Why?
----

[](#why)

The [PSR-11](http://www.php-fig.org/psr/psr-11/) container interface have the following properties:

- It's immutable. That means it can't be changed after it's been instantiated.
- It doesn't provide an iteration mechanism.

These two properties mean it's difficult to create a container which is a merge of two or more PSR-11 containers.

This library provides a container which implements the PSR-11 interface. It's constructed by an array of other PSR-11 containers. These containers can use any concrete implementation ([PHP-DI](https://github.com/PHP-DI/PHP-DI), [Pimple](https://github.com/silexphp/Pimple)) as long as they implement the PSR-11 interface.

Usage
-----

[](#usage)

Create a merged container:

```
$merged = new MergedContainer([$container1, $container2]);
```

Use it like any other PSR-11 container.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3086d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/296186?v=4)[Chris Harrison](/maintainers/chrisharrison)[@chrisharrison](https://github.com/chrisharrison)

---

Top Contributors

[![chrisharrison](https://avatars.githubusercontent.com/u/296186?v=4)](https://github.com/chrisharrison "chrisharrison (7 commits)")

---

Tags

containersiocphp7psr-11

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/chrisharrison-merged-container/health.svg)

```
[![Health](https://phpackages.com/badges/chrisharrison-merged-container/health.svg)](https://phpackages.com/packages/chrisharrison-merged-container)
```

###  Alternatives

[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)[api-platform/state

API Platform state interfaces

223.4M57](/packages/api-platform-state)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)[symfony/json-streamer

Provides powerful methods to read/write data structures from/into JSON streams.

14440.0k8](/packages/symfony-json-streamer)[rubix/server

Deploy your Rubix ML models to production with scalable stand-alone inference servers.

632.3k](/packages/rubix-server)

PHPackages © 2026

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