PHPackages                             httpsoft/http-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. [HTTP &amp; Networking](/categories/http)
4. /
5. httpsoft/http-runner

ActiveLibrary[HTTP &amp; Networking](/categories/http)

httpsoft/http-runner
====================

Running PSR-7 components and building PSR-15 middleware pipelines

1.1.1(1y ago)1455.0k↑23.5%4MITPHPPHP ^7.4|^8.0

Since Sep 13Pushed 1y ago2 watchersCompare

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

READMEChangelog (6)Dependencies (10)Versions (7)Used By (4)

HTTP Runner
===========

[](#http-runner)

[![License](https://camo.githubusercontent.com/8b6c421abaa473494e022575b2d1b85d881b6a40309dc9b226ce815d924635df/68747470733a2f2f706f7365722e707567782e6f72672f68747470736f66742f687474702d72756e6e65722f6c6963656e7365)](https://packagist.org/packages/httpsoft/http-runner)[![Latest Stable Version](https://camo.githubusercontent.com/c210b9294ca1463381878bc909bdf96e0b9c7ffce56473b7bd1f8cd8c8ac1955/68747470733a2f2f706f7365722e707567782e6f72672f68747470736f66742f687474702d72756e6e65722f76)](https://packagist.org/packages/httpsoft/http-runner)[![Total Downloads](https://camo.githubusercontent.com/92644ff4ea43bb91e15fca0e9fb1877e6b63c4c0ffcab9eaa5aef6d937bd0741/68747470733a2f2f706f7365722e707567782e6f72672f68747470736f66742f687474702d72756e6e65722f646f776e6c6f616473)](https://packagist.org/packages/httpsoft/http-runner)[![GitHub Build Status](https://github.com/httpsoft/http-runner/workflows/build/badge.svg)](https://github.com/httpsoft/http-runner/actions)[![GitHub Static Analysis Status](https://github.com/httpsoft/http-runner/workflows/static/badge.svg)](https://github.com/httpsoft/http-runner/actions)[![Scrutinizer Code Coverage](https://camo.githubusercontent.com/1228d6475be2c11f9d4277b0b45ccedbae4da30f2595bd73e34f3f46ef3d750e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68747470736f66742f687474702d72756e6e65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/httpsoft/http-runner/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/635c0af63d5e2bcb0d29ad9070ae7cd8352b8d003fc5d8122a0d5d8cd5615cce/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68747470736f66742f687474702d72756e6e65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/httpsoft/http-runner/?branch=master)

This package is responsible for running [PSR-7](https://github.com/php-fig/http-message) components and building [PSR-15](https://github.com/php-fig/http-factory) middleware pipelines.

Documentation
-------------

[](#documentation)

- [In English language](https://httpsoft.org/docs/runner).
- [In Russian language](https://httpsoft.org/ru/docs/runner).

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

[](#installation)

This package requires PHP version 7.4 or later.

```
composer require httpsoft/http-runner

```

Usage
-----

[](#usage)

```
use HttpSoft\Runner\MiddlewarePipeline;
use HttpSoft\Runner\MiddlewareResolver;
use HttpSoft\Runner\ServerRequestRunner;
use Psr\Http\Message\ResponseInterface;

/**
 * @var Psr\Http\Message\ServerRequestInterface $request
 * @var Psr\Http\Server\RequestHandlerInterface $handler
 * @var Psr\Http\Server\MiddlewareInterface $siteMiddleware
 * @var Psr\Http\Server\MiddlewareInterface $userMiddleware
 */

// Basic usage

$runner = new ServerRequestRunner();
$runner->run($request, $handler);

// Using `MiddlewarePipeline`

$pipeline = new MiddlewarePipeline();
$pipeline->pipe($siteMiddleware);
$pipeline->pipe($userMiddleware, '/user');

$runner = new ServerRequestRunner($pipeline);
$runner->run($request, $handler);

// Using `MiddlewareResolver`

$resolver = new MiddlewareResolver();
$handlerMiddleware = $resolver->resolve(function (): ResponseInterface {
    $response = new HttpSoft\Message\Response();
    $response->getBody()->write('Hello world!');
    return $response;
});

$pipeline = new MiddlewarePipeline();
$pipeline->pipe($siteMiddleware);
$pipeline->pipe($userMiddleware, '/user');
$pipeline->pipe($handlerMiddleware);

$runner = new ServerRequestRunner($pipeline);
$runner->run($request); // Output result: 'Hello world!'
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance40

Moderate activity, may be stable

Popularity36

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 97.2% 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 ~314 days

Recently: every ~388 days

Total

6

Last Release

505d ago

### Community

Maintainers

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

---

Top Contributors

[![devanych](https://avatars.githubusercontent.com/u/20116244?v=4)](https://github.com/devanych "devanych (35 commits)")[![batumibiz](https://avatars.githubusercontent.com/u/10770779?v=4)](https://github.com/batumibiz "batumibiz (1 commits)")

---

Tags

httphttp-middlewaremiddleware-pipelinephppsr-15psr-7httppsr-7phppsr-15http-middlewaremiddleware-pipeline

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/httpsoft-http-runner/health.svg)

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

###  Alternatives

[mezzio/mezzio-authentication

Authentication middleware for Mezzio and PSR-7 applications

121.6M26](/packages/mezzio-mezzio-authentication)[httpsoft/http-basis

Simple and fast HTTP microframework implementing PSR standards

1334.9k1](/packages/httpsoft-http-basis)[sunrise/http-router

A powerful solution as the foundation of your project.

16249.8k10](/packages/sunrise-http-router)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)[wellrested/wellrested

Simple PHP Library for RESTful APIs

4818.7k4](/packages/wellrested-wellrested)[idealo/php-middleware-stack

Implementation of HTTP Middleware PSR-15 specification

318.9k](/packages/idealo-php-middleware-stack)

PHPackages © 2026

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