PHPackages                             hypnotox/pack - 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. hypnotox/pack

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

hypnotox/pack
=============

PHP package offering immutable collections.

v0.3.2(3y ago)06[1 PRs](https://github.com/hypnotox/pack/pulls)MITPHPPHP &gt;=8.1

Since Dec 27Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (5)Versions (12)Used By (0)

hypnotox/pack
=============

[](#hypnotoxpack)

[![CI Status](https://github.com/hypnotox/pack/actions/workflows/ci.yml/badge.svg)](https://github.com/hypnotox/pack/actions/workflows/ci.yml/badge.svg)[![Code Coverage](https://camo.githubusercontent.com/1bee355789209a9d4680fcc23bc2e1eb54a3e5b3adc86e4359a96eccf76e2e0a/68747470733a2f2f636f6465636f762e696f2f67682f6879706e6f746f782f7061636b2f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/hypnotox/pack)[![Packagist Version](https://camo.githubusercontent.com/8536792bddd05cfc73a963b39aae7c71b954bae75cf127ebfa461027f701561b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6879706e6f746f782f7061636b)](https://packagist.org/packages/hypnotox/pack)[![Packagist PHP Version Support](https://camo.githubusercontent.com/4a37f6e79607a9c8cf4a417f1342b2afe6ba61eb10df805a5f895875796556b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6879706e6f746f782f7061636b)](https://packagist.org/packages/hypnotox/pack)[![GitHub](https://camo.githubusercontent.com/ce81b5a2bb2c0336c7f2e6dd99f8e2d04fbe6a710f5521e703d8d8f294766bde/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6879706e6f746f782f7061636b)](/LICENSE.md)

A collection library offering immutable collections.

Collections implement [`\HypnoTox\Pack\CollectionInterface`](/src/Collection/CollectionInterface.php) which extends `\IteratorAggregate`, `\ArrayAccess` and `\Countable` and adds other chainable methods.

This is just a personal project, but follows semantic versioning and will be stable once reaching its first major release.

PRs are welcome.

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

[](#installation)

Simply require it using composer: `composer require hypnotox/pack`

Features
--------

[](#features)

Currently, the only implemented collection is [`\HypnoTox\Pack\ArrayCollection`](/src/Collection/ArrayCollection.php).

Everything is type-hinted with generic template expressions to allow for full typing using static analysis.

Usage
-----

[](#usage)

### ArrayCollection

[](#arraycollection)

```
$collection = new \HypnoTox\Pack\ArrayCollection([1, 2, 3]);

$collection->first()->key; // 0
$collection->first()->value; // 1
$collection->set(0, 100)->first()->value; // 100
```

Collection Methods
------------------

[](#collection-methods)

// TODO

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.5% 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 ~20 days

Recently: every ~1 days

Total

10

Last Release

1423d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b5b9c61f4243d23e766c730ef4f2590d718befb32bcaf91cc18d14566d588c0?d=identicon)[hypnotox](/maintainers/hypnotox)

---

Top Contributors

[![hypnotox](https://avatars.githubusercontent.com/u/47070257?v=4)](https://github.com/hypnotox "hypnotox (83 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (13 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/hypnotox-pack/health.svg)

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

PHPackages © 2026

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