PHPackages                             svensp/callection - 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. svensp/callection

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

svensp/callection
=================

Track 'current' items for stacked closure calls

00PHP

Since Sep 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/svensp/callection)[ Packagist](https://packagist.org/packages/svensp/callection)[ RSS](/packages/svensp-callection/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

nested-callable-collection
==========================

[](#nested-callable-collection)

nested callable collection helps you keep track of 'something' that is used by callables like closures.

There are 2 componentes to this

- a stack keeping track of the 'current' item
- a collection, saving the items by name or index of appearance

Install
-------

[](#install)

nested-callable-collection is installed via composer

composer require svensp/nested-callable-collection

Use case
--------

[](#use-case)

The idea behind nested-callable-collection is to support the following way of defining the world in a unit test:

```
$this->asUser(function() {
  $this->withGame(function() {

    $this->withUser(function() {
      $this->withUnit();
    });

    $this->withUser();
  });
});
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f1ab6ff16fc96d20efd363563c961db68587721536c6559d692f461588a1246?d=identicon)[svensp](/maintainers/svensp)

---

Top Contributors

[![svensp](https://avatars.githubusercontent.com/u/7204121?v=4)](https://github.com/svensp "svensp (1 commits)")

### Embed Badge

![Health badge](/badges/svensp-callection/health.svg)

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

PHPackages © 2026

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