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

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

maduser/argon-http
==================

HTTP kernel and response emitter for the Argon runtime stack.

v1.0.0(2mo ago)0211MITPHP ^8.2

Since May 24Compare

[ Source](https://github.com/judus/argon-http)[ Packagist](https://packagist.org/packages/maduser/argon-http)[ RSS](/packages/maduser-argon-http/feed)WikiDiscussions Synced 3w ago

READMEChangelogDependencies (13)Versions (3)Used By (1)

Argon HTTP
==========

[](#argon-http)

[![PHP](https://camo.githubusercontent.com/ce3e396e4f1bbbd326f628872a1414656d28065f2712cda0868d8eff07320aec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322b2d626c7565)](https://www.php.net/)[![Build](https://github.com/judus/argon-http/actions/workflows/php.yml/badge.svg)](https://github.com/judus/argon-http/actions)[![codecov](https://camo.githubusercontent.com/7845bd9b7a0f3d71642d33a236b30e833173da4a06b95f13831e3a5d8ab7b73f/68747470733a2f2f636f6465636f762e696f2f67682f6a756475732f6172676f6e2d687474702f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/judus/argon-http)[![Psalm Level](https://camo.githubusercontent.com/b3fa6689085a11445cd00dd2cbd1a6614208e234c5f314839305663593811f9f/68747470733a2f2f73686570686572642e6465762f6769746875622f6a756475732f6172676f6e2d687474702f636f7665726167652e737667)](https://shepherd.dev/github/judus/argon-http)[![Latest Version](https://camo.githubusercontent.com/26064239e9953b0a67d289417c69768c8caf317942151ccb7322848b83d403d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6164757365722f6172676f6e2d687474702e737667)](https://packagist.org/packages/maduser/argon-http)[![Downloads](https://camo.githubusercontent.com/e322004e170f253844264a11f86f204eb890f1fb4e7255b12af470e76c1d83c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6164757365722f6172676f6e2d687474702e737667)](https://packagist.org/packages/maduser/argon-http)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

`maduser/argon-http` is the HTTP runtime adapter for Argon applications. It provides the kernel and response emitter that Prophecy can use after the container, routing, middleware, and error packages have been registered.

The package is intentionally small:

- `Kernel` runs the HTTP request lifecycle.
- `ResponseEmitter` emits PSR-7 responses to SAPI.
- `HttpKernelServiceProvider` binds the kernel and emitter into an `ArgonContainer`.

It does not define routes, build middleware stacks, format exceptions, or create PSR-7 messages. Those responsibilities belong to the routing, middleware, error, and HTTP message packages.

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

[](#installation)

```
composer require maduser/argon-http
```

For a complete HTTP stack, applications normally combine this package with:

- `maduser/argon-prophecy`
- `maduser/argon-http-message`
- `maduser/argon-routing`
- `maduser/argon-middleware`
- `maduser/argon-error`

Service Provider
----------------

[](#service-provider)

Register the HTTP provider during application boot:

```
use Maduser\Argon\Container\ArgonContainer;
use Maduser\Argon\Http\Provider\HttpKernelServiceProvider;

$container = new ArgonContainer();
$container->register(HttpKernelServiceProvider::class);
```

The provider binds:

- `Maduser\Argon\Contracts\Handler\AppHandlerInterface` to `Kernel`
- `Psr\Http\Message\ServerRequestInterface` through the HTTP message server-request factory
- `Maduser\Argon\Support\Contracts\ResponseEmitterInterface` to `ResponseEmitter`

The server request binding is only registered when the application has not already provided one. It uses a normal factory binding, not a closure, so the container can still be compiled. This keeps tests, workers, and custom front controllers in control while giving normal SAPI front controllers a useful default.

The kernel expects the container to resolve a `RequestHandlerInterface`. In the full Argon HTTP stack that is usually provided by `maduser/argon-routing` and `maduser/argon-middleware`.

Exit Behaviour
--------------

[](#exit-behaviour)

By default the provider sets `kernel.shouldExit` from the runtime environment:

- `APP_ENV=testing` disables hard exits.
- all other environments allow the kernel to exit after emitting a response.

Applications can set `kernel.shouldExit` before registering the provider to override that default.

Error Handling
--------------

[](#error-handling)

The HTTP kernel deliberately does not catch or format exceptions. Runtime throwables are coordinated by Prophecy and the error package so the kernel stays focused on three operations:

1. process the request through a PSR-15 request handler;
2. emit the returned PSR-7 response;
3. terminate with an exit code derived from the response status.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance88

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

61d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fb9da5a15010d335622bf9f465a32ef79c8d1cffcd139c2a9114736b72e2c13?d=identicon)[jdu](/maintainers/jdu)

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k19.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)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k16](/packages/tempest-framework)[sunrise/http-router

A powerful solution as the foundation of your project.

17451.8k11](/packages/sunrise-http-router)[typo3/cms-core

TYPO3 CMS Core

3713.2M5.2k](/packages/typo3-cms-core)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)

PHPackages © 2026

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