PHPackages                             domainflow/http - 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. domainflow/http

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

domainflow/http
===============

A lightweight PSR-7/15 HTTP kernel, routing, endpoint dispatch, and problem-details package for DomainFlow applications.

v0.1.0(today)011↑2627.3%1MITPHPPHP ^8.4CI passing

Since Aug 25Pushed todayCompare

[ Source](https://github.com/domainflow/http)[ Packagist](https://packagist.org/packages/domainflow/http)[ RSS](/packages/domainflow-http/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (17)Versions (3)Used By (1)

DomainFlow HTTP
===============

[](#domainflow-http)

[![Tests](https://github.com/domainflow/http/actions/workflows/tests.yml/badge.svg)](https://github.com/domainflow/http/actions/workflows/tests.yml)[![Packagist Version](https://camo.githubusercontent.com/3313321d34dc9706cf12d6794f378363944a98304d1e0698e53fe83f080c3890/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f6d61696e666c6f772f68747470)](https://camo.githubusercontent.com/3313321d34dc9706cf12d6794f378363944a98304d1e0698e53fe83f080c3890/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f6d61696e666c6f772f68747470)[![PHP Version](https://camo.githubusercontent.com/38573e897ce09b0d209007a59347f11228bde99907074d8cdd500f2d9dfc0562/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6d61696e666c6f772f68747470)](https://camo.githubusercontent.com/38573e897ce09b0d209007a59347f11228bde99907074d8cdd500f2d9dfc0562/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f646f6d61696e666c6f772f68747470)[![License](https://camo.githubusercontent.com/0b6fc8e9386a8255c92b6b71d24301027af29866984e97a99eff983153bb738e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f646f6d61696e666c6f772f68747470)](https://camo.githubusercontent.com/0b6fc8e9386a8255c92b6b71d24301027af29866984e97a99eff983153bb738e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f646f6d61696e666c6f772f68747470)[![PHPStan](https://camo.githubusercontent.com/a091149e9a56db5b866ba9ab53176a4b9db9ed13c68eb10003839883108e99ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c253231302d627269676874677265656e2e737667)](https://camo.githubusercontent.com/a091149e9a56db5b866ba9ab53176a4b9db9ed13c68eb10003839883108e99ba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d4c6576656c253231302d627269676874677265656e2e737667)

DomainFlow HTTP is a small PSR-based HTTP entry point for DomainFlow applications. It routes PSR-7 server requests to typed invokable endpoints and provides request hydration, endpoint dispatch, JSON responses, Problem Details, compiled routing, and an optional DomainFlow Core bootstrap adapter.

The package keeps application and domain code independent of Symfony HttpFoundation, a concrete PSR-7 implementation, and a full-stack framework.

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

[](#requirements)

- PHP 8.4 or later; tested on PHP 8.4 and PHP 8.5
- PSR-7 message and PSR-17 factory implementations supplied by the application
- A PSR-11 container when using the included `Psr11EndpointResolver`

Symfony Routing and Relay are internal implementation dependencies. Concrete PSR-7 implementations and SAPI emitters remain application choices.

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

[](#installation)

```
composer require domainflow/http
```

The optional Core bridge is available when `domainflow/core` is installed. The library itself does not require DomainFlow Core at runtime.

Basic composition
-----------------

[](#basic-composition)

Declare an endpoint as an invokable class with a route attribute:

```
use DomainFlow\Http\Attribute\Route;

#[Route(method: 'GET', path: '/hello/{name}', name: 'hello')]
final class HelloEndpoint
{
    public function __invoke(HelloRequest $request): array
    {
        return ['message' => 'Hello, ' . $request->name . '!'];
    }
}

final readonly class HelloRequest
{
    public function __construct(public string $name)
    {
    }
}
```

Runtime implementations
-----------------------

[](#runtime-implementations)

The package deliberately does not choose a concrete PSR implementation or SAPI emitter. A minimal application-owned composition is available in [`examples/runtime`](examples/runtime/). It uses Nyholm PSR-7 and Laminas' HTTP handler runner:

```
cd examples/runtime
composer install
php -S 127.0.0.1:8080 -t public public/index.php
```

Then request the example endpoint:

```
curl http://127.0.0.1:8080/hello/Ada
# {"message":"Hello, Ada!"}
```

DomainFlow Core
---------------

[](#domainflow-core)

`DomainFlow\Http\Bridge\DomainFlowCore\HttpServiceProvider` registers the HTTP kernel and default ports during Core bootstrap. Existing application routers, hydrators, endpoint adapters, problem mappers, and PSR factories remain application-owned. Core's callable middleware pipeline is not merged into the PSR-15 request pipeline.

Development
-----------

[](#development)

```
composer test-all
composer phpstan
composer lint
composer quality
```

The package targets PHP 8.4 and 8.5, PHPStan level 10, strict formatting, dependency auditing, and full reachable-source line coverage.

License
-------

[](#license)

MIT license.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

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

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/132363982?v=4)[42dknp](/maintainers/42dknp)[@42dknp](https://github.com/42dknp)

---

Top Contributors

[![42dknp](https://avatars.githubusercontent.com/u/132363982?v=4)](https://github.com/42dknp "42dknp (3 commits)")

---

Tags

httppsr-7routingpsr-15dddMicroservicedomainflow

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[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/cakephp

The CakePHP framework

8.9k20.0M1.9k](/packages/cakephp-cakephp)[typo3/cms-core

TYPO3 CMS Core

3313.6M5.7k](/packages/typo3-cms-core)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B4.5k](/packages/guzzlehttp-psr7)[sunrise/http-router

A powerful solution as the foundation of your project.

16852.3k12](/packages/sunrise-http-router)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)

PHPackages © 2026

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