PHPackages                             dhii/collections-interface - 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. dhii/collections-interface

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

dhii/collections-interface
==========================

A highly ISP-compliant collection of interfaces that represent maps and lists.

v0.3.0(4y ago)0146.3k↓34.1%[1 PRs](https://github.com/Dhii/collections-interface/pulls)15MITPHPPHP ^7.1 | ^8.0CI passing

Since Nov 9Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/Dhii/collections-interface)[ Packagist](https://packagist.org/packages/dhii/collections-interface)[ RSS](/packages/dhii-collections-interface/feed)WikiDiscussions 0.5.x Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (25)Used By (15)

Dhii - Collections Interface
============================

[](#dhii---collections-interface)

[![Continuous Integration](https://github.com/Dhii/collections-interface/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/Dhii/collections-interface/actions/workflows/continuous-integration.yml)[![Latest Stable Version](https://camo.githubusercontent.com/df6905545e6facef6692a4bd29d50d0f6516c9c354d2fafc074fd60a3a99a55f/68747470733a2f2f706f7365722e707567782e6f72672f646869692f636f6c6c656374696f6e732d696e746572666163652f76)](//packagist.org/packages/dhii/collections-interface)[![Latest Unstable Version](https://camo.githubusercontent.com/79804414fa105050e20328e0536dd10fc61a3a17c6ab00bd2016f19d2f4f5466/68747470733a2f2f706f7365722e707567782e6f72672f646869692f636f6c6c656374696f6e732d696e746572666163652f762f756e737461626c65)](//packagist.org/packages/dhii/collections-interface)

A highly [ISP](https://en.wikipedia.org/wiki/Interface_segregation_principle)-compliant collection of interfaces that represent collections.

Interfaces
----------

[](#interfaces)

- [`CountableListInterface`](src/CountableListInterface.php): A list that can be iterated and counted.
- [`HasItemCapableInterface`](src/HasItemCapableInterface.php): Something that can be checked for the existence of an item.
- [`SetInterface`](src/SetInterface.php): A list that can be checked for a value.
- [`CountableSetInterface`](src/CountableSetInterface.php): A set that can be counted.
- [`MapInterface`](src/MapInterface.php): An iterable container.
- [`CountableMapInterface`](src/CountableMapInterface.php): A countable map.
- [`ContainerFactoryInterface`](src/ContainerFactoryInterface.php): A factory of `ContainerInterface` objects.
- [`MapFactoryInterface`](src/MapFactoryInterface.php): A factory of `MapInterface` objects.
- [`HasCapableInterface`](src/HasCapableInterface.php): Something that can check for a given key.
- [`ContainerInterface`](src/ContainerInterface.php): A container implementing `HasCapableInterface`.
- [`WritableContainerInterface`](src/WritableContainerInterface.php): A container that can have mappings added and removed.
- [`WritableMapInterface`](src/WritableMapInterface.php): A map that can have mappings added and removed.
- [`WritableSetInterface`](src/WritableSetInterface.php): A set that can have items added and removed.
- [`ClearableContainerInterface`](src/ClearableContainerInterface.php): A container that can have its members cleared.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance59

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity68

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

Recently: every ~137 days

Total

20

Last Release

56d ago

PHP version history (5 changes)v0.1.0PHP ^5.3 | ^7.0

v0.3.0-alpha1PHP ^7.1

v0.3.0-alpha3PHP ^7.1 | ^8.0

v0.4.0-alpha1PHP ^7.4 | ^8.0

v0.5.0-beta1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/1894e91b32c9f80d8f30a42d360af6983a507f1cf2c621b7c9a0a0de14e011c5?d=identicon)[XedinUnknown](/maintainers/XedinUnknown)

---

Top Contributors

[![XedinUnknown](https://avatars.githubusercontent.com/u/1428973?v=4)](https://github.com/XedinUnknown "XedinUnknown (243 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dhii-collections-interface/health.svg)

```
[![Health](https://phpackages.com/badges/dhii-collections-interface/health.svg)](https://phpackages.com/packages/dhii-collections-interface)
```

###  Alternatives

[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k431.1M7.5k](/packages/symfony-dependency-injection)[illuminate/contracts

The Illuminate Contracts package.

705122.9M10.1k](/packages/illuminate-contracts)[illuminate/container

The Illuminate Container package.

31178.1M2.0k](/packages/illuminate-container)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)

PHPackages © 2026

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