PHPackages                             hakone/middleware-dispatcher - 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. [Framework](/categories/framework)
4. /
5. hakone/middleware-dispatcher

ActiveLibrary[Framework](/categories/framework)

hakone/middleware-dispatcher
============================

A lightweight PSR-15 middleware dispatcher

0.1.0(3y ago)19.8k↑18.5%Apache-2.0PHPPHP &gt;=7.3

Since Mar 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/hakonephp/middleware-dispatcher)[ Packagist](https://packagist.org/packages/hakone/middleware-dispatcher)[ RSS](/packages/hakone-middleware-dispatcher/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (9)Versions (3)Used By (0)

Hakone PSR-15 middleware dispatcher 🏃‍♀️
========================================

[](#hakone-psr-15-middleware-dispatcher-‍️)

**Hakone** is a lightweight [PSR-15](https://www.php-fig.org/psr/psr-15/) middleware dispatcher implementation. It is inspired by [Relay](https://relayphp.com/).

Concept
-------

[](#concept)

The PSR-15 is designed to be general purpose middleware. All middleware can intervene in both requests and responses.

Hakone is a "queue-based request handler" described in [PSR-15 Meta Document](https://www.php-fig.org/psr/psr-15/meta/). The downside of queue-based is that the more middleware you have, the more stack traces will pile up.

We've written a number of small-duty middlewares, but for many use cases they only do work on either the request or the response. We decided to classify the types of middleware into three types: **"request interceptor"**, **"general-purpose middleware"** and **"response decorator"**.

How to use
----------

[](#how-to-use)

```
$dispatcher = Hakone\relay([
    'interceptors' => [
        // ...
    ],
    'middlewares' => [
        // ...
    ],
    'handler' => $handler
    'decorators' => [
        // ...
    ],
]);
```

Copyright
---------

[](#copyright)

```
Copyright 2023 USAMI Kenta

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity28

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.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

1212d ago

### Community

Maintainers

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

---

Top Contributors

[![zonuexe](https://avatars.githubusercontent.com/u/822086?v=4)](https://github.com/zonuexe "zonuexe (11 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/hakone-middleware-dispatcher/health.svg)

```
[![Health](https://phpackages.com/badges/hakone-middleware-dispatcher/health.svg)](https://phpackages.com/packages/hakone-middleware-dispatcher)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

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

Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs

12.3k52.9M1.4k](/packages/slim-slim)[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)[spiral/framework

Spiral, High-Performance PHP/Go Framework

2.1k2.2M66](/packages/spiral-framework)[cakephp/authentication

Authentication plugin for CakePHP

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

TYPO3 CMS Core

3713.2M5.1k](/packages/typo3-cms-core)

PHPackages © 2026

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