PHPackages                             ideationnet/stack-runner - 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. ideationnet/stack-runner

ActiveLibrary

ideationnet/stack-runner
========================

Simple stack-runner for PSR-15 compatible middleware

4.0(8y ago)2941MITPHPPHP ~7.0

Since Nov 29Pushed 8y ago2 watchersCompare

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

READMEChangelogDependencies (5)Versions (6)Used By (1)

Stack Runner
============

[](#stack-runner)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3912c4164bef2beb9be5fd94fcda700f6072ee1c3bef6e82a926b23b104513c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6964656174696f6e6e65742f737461636b2d72756e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ideationnet/stack-runner)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/53b4e58483cd5d0cae6cb4fc32380c78a3c4512099c859f7c4b3a715966ef460/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6964656174696f6e6e65742f737461636b2d72756e6e65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/ideationnet/stack-runner)[![Coverage Status](https://camo.githubusercontent.com/06bc6c9465d91321c687b2f4fc01fa56bf3fd57c12fd9e49636493672bab4318/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6964656174696f6e6e65742f737461636b2d72756e6e65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ideationnet/stack-runner/code-structure)[![Quality Score](https://camo.githubusercontent.com/307a0a3f6f9d0cfff21220274dd3a253f44c0830639021478fe39695eda5b97f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6964656174696f6e6e65742f737461636b2d72756e6e65722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ideationnet/stack-runner)[![Total Downloads](https://camo.githubusercontent.com/eb156246f7b40cf20224cc7a84d22dd0af96030e030e7c8bf0b880007db4d106/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6964656174696f6e6e65742f737461636b2d72756e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ideationnet/stack-runner)[![StyleCI](https://camo.githubusercontent.com/47db89e0ee37c8628002b2dfa9ac43ef91d32024ca85eada8d0bc22c9c124724/68747470733a2f2f7374796c6563692e696f2f7265706f732f37353036353735322f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/75065752)

A simple PSR-15 compatible middleware dispatcher.

**v3 breaking changes**: updated to use "http-interop/http-middleware" v0.5 where Delegate has been replaced with ResponseHandler.

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

[](#requirements)

- PHP7+
- A stack of [PSR-15](https://github.com/http-interop/http-middleware) middleware, such as [Router](https://github.com/ideationnet/router-middleware) or [Middlewares](https://github.com/middlewares/psr15-middlewares)
- A [PSR-17 HTTP factory](https://github.com/http-interop/http-factory)
- An invoker compatible with [InvokerInterface](https://github.com/PHP-DI/Invoker/blob/master/src/InvokerInterface.php)

Install
-------

[](#install)

Via Composer

```
$ composer require ideationnet/stack-runner
```

Usage
-----

[](#usage)

To instantiate directly, provide the stack of middleware, the invoker to use, and the response factory:

```
$runner = new IdNet\StackRunner($middleware, $invoker, $factory);
$response = $runner->dispatch($request);
```

Although you will probably use with your preferred [DI Container](https://github.com/container-interop/container-interop)rather than instantiating directly:

```
$runner = $container->get(StackRunner::class);
```

Here's configuration for [PHP-DI](http://php-di.org/), which is preferred, as the container also doubles as a compatible `Invoker`:

```
return [
    StackRunner::class => object()
        ->constructorParameter('stack', get('middleware')),
];
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Darren Mothersele](http://www.darrenmothersele.com)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License. Please see [License File](License.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

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

Total

4

Last Release

3103d ago

Major Versions

1.0.0 → 2.02016-12-23

2.0 → 3.02017-10-23

3.0 → 4.02017-11-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f0ce40e51bf1fb3ba86b4a566dbbb0a26e8792e1b9418228324e26e7450f42b?d=identicon)[darrenmothersele](/maintainers/darrenmothersele)

---

Top Contributors

[![darrenmothersele](https://avatars.githubusercontent.com/u/230337?v=4)](https://github.com/darrenmothersele "darrenmothersele (24 commits)")

---

Tags

ideationnetstack-runner

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ideationnet-stack-runner/health.svg)

```
[![Health](https://phpackages.com/badges/ideationnet-stack-runner/health.svg)](https://phpackages.com/packages/ideationnet-stack-runner)
```

###  Alternatives

[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/packages/php-di-php-di)[mnapoli/silly

Silly CLI micro-framework based on Symfony Console

93110.5M128](/packages/mnapoli-silly)[php-di/slim-bridge

PHP-DI integration in Slim

1786.7M98](/packages/php-di-slim-bridge)[infinum/eightshift-libs

WordPress libs developed by Eightshift team to use in modern WordPress.

63118.9k3](/packages/infinum-eightshift-libs)[rareloop/router

A powerful PHP Router for PSR7 messages inspired by the Laravel API

92178.9k4](/packages/rareloop-router)[dapr/php-sdk

Dapr Implementation in PHP

7480.5k6](/packages/dapr-php-sdk)

PHPackages © 2026

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