PHPackages                             codin/relay - 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. codin/relay

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

codin/relay
===========

Tiny PSR-15 Http Server Middleware Processor

0.1.1(4y ago)16.0kMITPHPPHP &gt;=7.3CI failing

Since Aug 19Pushed 4y agoCompare

[ Source](https://github.com/codin/relay)[ Packagist](https://packagist.org/packages/codin/relay)[ RSS](/packages/codin-relay/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

Tiny PSR-15 Http Server Middleware Processor
============================================

[](#tiny-psr-15-http-server-middleware-processor)

[![version](https://camo.githubusercontent.com/b3b2817c1141b5f6c83ba2c72826d6aee4e51f962dd8ba5ddc4c0ce6ce5340bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f636f64696e2f72656c6179)](https://camo.githubusercontent.com/b3b2817c1141b5f6c83ba2c72826d6aee4e51f962dd8ba5ddc4c0ce6ce5340bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f636f64696e2f72656c6179)[![workflow](https://camo.githubusercontent.com/591200e82dfe4f892abc63452246e81a5894d09c110565d63e5c9e9f3cb2b7e7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f636f64696e2f72656c61792f436f6d706f736572)](https://camo.githubusercontent.com/591200e82dfe4f892abc63452246e81a5894d09c110565d63e5c9e9f3cb2b7e7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f636f64696e2f72656c61792f436f6d706f736572)[![license](https://camo.githubusercontent.com/1fd158c48174a9e453457122150e66be13546dff5dd39c2f5c3fdfb8424ed847/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636f64696e2f72656c6179)](https://camo.githubusercontent.com/1fd158c48174a9e453457122150e66be13546dff5dd39c2f5c3fdfb8424ed847/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636f64696e2f72656c6179)

Example

```
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;

// Define some Middlewares
$response = new class() implements MiddlewareInterface {
    public function process(RequestInterface $request, RequestHandlerInterface $handler): ResponseInterface {
        $psr17Factory = new Nyholm\Psr7\Factory\Psr17Factory();
        $responseBody = $psr17Factory->createStream('');
        return $psr17Factory->createResponse(200)->withBody($responseBody);
    }
};

$cors = new class() implements MiddlewareInterface {
    public function process(RequestInterface $request, RequestHandlerInterface $handler): ResponseInterface {
        return $handler->handle($request)->withHeader('Access-Control-Allow-Origin', '*');
    }
};

$exceptions = new class() implements MiddlewareInterface {
    public function process(RequestInterface $request, RequestHandlerInterface $handler): ResponseInterface {
        try {
            return $handler->handle($request);
        } catch (Throwable $exception) {
            $this->logger->error('Server Error', compact('exception'));
            $psr17Factory = new Nyholm\Psr7\Factory\Psr17Factory();
            $responseBody = $psr17Factory->createStream('Server Error');
            return $psr17Factory->createResponse(500)->withBody($responseBody);
        }
    }
};

// Create a request
$psr17Factory = new Nyholm\Psr7\Factory\Psr17Factory();
$request = $psr17Factory->createRequest('GET', 'http://tnyholm.se');

// Run middlewares on a request to create a response
$relay = new Codin\Relay\Relay([$cors, $exceptions, $response]);
$response = $relay->handle($request);
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

Total

2

Last Release

1564d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/caaa77e482db0b7e6340c815a767adfa0c910d7ad437427a51702a619a202de9?d=identicon)[rwarasaurus](/maintainers/rwarasaurus)

---

Top Contributors

[![kierwils](https://avatars.githubusercontent.com/u/596586?v=4)](https://github.com/kierwils "kierwils (8 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/codin-relay/health.svg)

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

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.9k19.5M1.8k](/packages/cakephp-cakephp)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[cakephp/authentication

Authentication plugin for CakePHP

1214.1M104](/packages/cakephp-authentication)[typo3/cms-core

TYPO3 CMS Core

3713.2M5.1k](/packages/typo3-cms-core)[sunrise/http-router

A powerful solution as the foundation of your project.

17451.6k10](/packages/sunrise-http-router)[typo3/cms-adminpanel

TYPO3 CMS Admin Panel - The Admin Panel displays information about your site in the frontend and contains a range of metrics including debug and caching information.

115.7M66](/packages/typo3-cms-adminpanel)

PHPackages © 2026

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