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

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

kovagoz/http-middleware-request-dispatcher
==========================================

PSR-15 compatible request dispatcher

1.0.0(4y ago)05MITPHPPHP ^7.4|^8.0

Since Aug 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/kovagoz/http-middleware-request-dispatcher)[ Packagist](https://packagist.org/packages/kovagoz/http-middleware-request-dispatcher)[ RSS](/packages/kovagoz-http-middleware-request-dispatcher/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

PSR-15 compatible request dispatcher
====================================

[](#psr-15-compatible-request-dispatcher)

The purpose of this middleware is to dispatch the request to the assigned handler, also known as the controller.

[![phpunit workflow](https://github.com/kovagoz/http-middleware-request-dispatcher/actions/workflows/php.yml/badge.svg)](https://github.com/kovagoz/http-middleware-request-dispatcher/actions/workflows/php.yml/badge.svg)

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

[](#requirements)

- PHP 7.4 or above

Usage
-----

[](#usage)

Middleware needs a *resolver* object to be able to make the proper request handler object. It must be injected through the constructor. This package contains a simple resolver implementation which uses a PSR-11 compatible DI container to do the job:

```
$resolver   = new ContainerResolver($container);
$middleware = new RequestDispatcher($resolver);
```

Middleware looks for a special attribute of the request object called *\_\_handler*. This attribute tells which handler should handle the request. If it's missing, nothing happens, request will be passed to the next middleware.

Here an example how you can tell which handler should handle the request:

```
// PSR-7 server request object
$request = $request->withAttribute('__handler', MyController::class);
$middleware->process($request, $nextMiddleware);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Unknown

Total

1

Last Release

1746d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/664c17e6a7f99c063d1734e49da5623df8d9e91a30a692fcbb10bfc375eff43b?d=identicon)[kovagoz](/maintainers/kovagoz)

---

Top Contributors

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

---

Tags

middlewarephppsr-15

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kovagoz-http-middleware-request-dispatcher/health.svg)

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

###  Alternatives

[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k48.1M236](/packages/api-platform-core)[mezzio/mezzio

PSR-15 Middleware Microframework

3883.6M97](/packages/mezzio-mezzio)[mezzio/mezzio-authentication-oauth2

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

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

Authentication middleware for Mezzio and PSR-7 applications

121.6M26](/packages/mezzio-mezzio-authentication)[api-platform/state

API Platform state interfaces

223.4M57](/packages/api-platform-state)[mezzio/mezzio-helpers

Helper/Utility classes for Mezzio

134.3M67](/packages/mezzio-mezzio-helpers)

PHPackages © 2026

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