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

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

rokke/http
==========

HTTP transport adapter for the Rokke Runtime — routes Swoole HTTP requests to compiled operations

0.14.0(1mo ago)00MITPHPPHP &gt;=8.4CI passing

Since Jul 3Pushed 1mo agoCompare

[ Source](https://github.com/rokke-php/http)[ Packagist](https://packagist.org/packages/rokke/http)[ Docs](https://rokke.dev)[ RSS](/packages/rokke-http/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (12)Versions (15)Used By (0)

rokke/http
==========

[](#rokkehttp)

[![CI](https://github.com/rokke-php/http/actions/workflows/ci.yml/badge.svg)](https://github.com/rokke-php/http/actions/workflows/ci.yml)[![Latest Version](https://camo.githubusercontent.com/8c097aa6b34d68a3ef0db659e88efa8d113e9dabdc9008d4de2dd3950f488532/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f726f6b6b652d7068702f687474703f6c6162656c3d76657273696f6e)](https://github.com/rokke-php/http/releases)[![PHP](https://camo.githubusercontent.com/755ca4b86b940e73511525af12859edb239dd9c424cde1036f789bf4f574c389/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e342d383839326265)](https://www.php.net)[![License](https://camo.githubusercontent.com/a65a033b5535e0f16f8a5378d62dc828c76d5968487d01187e00f4fd08e997c5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f726f6b6b652d7068702f68747470)](LICENSE)

HTTP transport adapter for the [Rokke Runtime](https://github.com/rokke-php/runtime).

What this is
------------

[](#what-this-is)

`rokke/http` is not an HTTP framework — it is an HTTP adapter. It takes Swoole HTTP requests, resolves them against a compiled route tree, and dispatches them to the Rokke Runtime's `ExecutionEngine`. The Runtime never knows a URL existed. This package owns the entire HTTP boundary: route compilation, request parsing, context construction, and response emission.

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

[](#installation)

```
composer require rokke/http
```

Requires PHP ≥ 8.4, `ext-swoole ≥ 5.0`, `rokke/runtime ^0.7`, and `rokke/contracts ^0.4`.

Architecture
------------

[](#architecture)

```
Swoole HTTP Request
        ↓
    HttpHost
        ↓
 CompiledRouteTree        ← compiled at Build time, never rebuilt
        ↓
  OperationContext        ← path params + headers + body parsed here
        ↓
  ExecutionEngine         ← unchanged; knows nothing about HTTP
        ↓
  ResultEmitter           ← converts Operation result → Swoole Response
        ↓
Swoole HTTP Response

```

The `CompiledRouteTree` is registered in the Runtime's `ArtifactRepository` during the Build phase. At runtime, `HttpHost` retrieves it via `$runtime->artifacts->get(CompiledRouteTree::class)` — no direct coupling between the HTTP module and the Runtime internals.

When to use
-----------

[](#when-to-use)

Use `rokke/http` when you need an HTTP transport for a Rokke application. For CLI, queue, or gRPC transports, use the corresponding adapter packages instead.

Stability
---------

[](#stability)

Pre-1.0. API may change between minor versions. Pin to an exact minor version in production.

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance92

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81% 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

14

Last Release

36d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/55115722?v=4)[Fernando Duarte](/maintainers/ferchd)[@ferchd](https://github.com/ferchd)

---

Top Contributors

[![ferchd](https://avatars.githubusercontent.com/u/55115722?v=4)](https://github.com/ferchd "ferchd (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

httpphpphp84rokkeswoolehttpphpswoolerokke

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[swlib/saber

Swoole coroutine HTTP client

981151.2k31](/packages/swlib-saber)[swoole/grpc

Grpc PHP Client base on Swoole Http2 Coroutine

19720.2k1](/packages/swoole-grpc)[hyperf/http-server

A HTTP Server for Hyperf.

103.0M407](/packages/hyperf-http-server)[swoole-bundle/swoole-bundle

Open/Swoole Symfony Bundle

7266.2k](/packages/swoole-bundle-swoole-bundle)[swoole/etcd-client

Grpc PHP Client base on Swoole Http2 Coroutine

1973.3k1](/packages/swoole-etcd-client)[swlib/http

Swlib-HTTP base class repository, PSR implementation

11151.7k4](/packages/swlib-http)

PHPackages © 2026

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