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

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

componenta/http-emitter
=======================

PSR-7 response emitter for Componenta

v1.0.0(1mo ago)082MITPHPPHP ^8.4

Since Jun 16Pushed 1mo agoCompare

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

READMEChangelog (1)Dependencies (2)Versions (2)Used By (2)

Componenta HTTP Emitter
=======================

[](#componenta-http-emitter)

PSR-7 response emitter for Componenta HTTP applications. It sends status, headers, and body content to PHP output.

Use this package at the outer HTTP entry point after the PSR-15 pipeline has produced a `ResponseInterface`.

Boundary
--------

[](#boundary)

This package only emits an already built response. It does not build responses, create server requests, or run middleware. Use `componenta/http-responder` for response creation and `componenta/app-http` for the HTTP runtime pipeline.

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

[](#installation)

```
composer require componenta/http-emitter
```

`Componenta\Http\EmitterConfigProvider` is exposed through Composer metadata.

Public API
----------

[](#public-api)

`EmitterInterface::emit(ResponseInterface $response): void` emits a response. `Emitter` is the default implementation.

```
use Componenta\Http\EmitterInterface;

/** @var EmitterInterface $emitter */
$emitter->emit($response);
```

`Emitter` accepts an optional chunk size:

```
$emitter = new Componenta\Http\Emitter(chunkSize: 16_384);
```

`EmitStrategy` controls body emission:

CaseMeaning`Full`Emit the full response body.`Partial`Emit a range response body.`NoBody`Emit headers without a body.`EmitterException` is thrown for emitter-level failures.

Runtime Behavior
----------------

[](#runtime-behavior)

Before emitting, `Emitter` checks that headers have not already been sent and clears active output buffers. Then it chooses a strategy from the response status and headers:

StrategyWhen it is used`NoBody`Informational statuses, `204`, `304`, `416`, or unsatisfiable `Content-Range`.`Partial`Status `206` with a `Content-Range` header.`Full`All other responses.For full responses, the emitter adds `Content-Length` when the stream size is known and the header is missing. For seekable streams with known size it also adds `Accept-Ranges: bytes`. Bodies are streamed in chunks and stop early if the client disconnects.

For partial responses, a valid `Content-Range` controls the emitted byte range when the body stream is seekable. If the range cannot be parsed or the stream is not seekable, the emitter falls back to emitting the full body that is present in the response.

Configuration
-------------

[](#configuration)

The config provider registers `Emitter` and aliases `EmitterInterface` to it. Applications normally receive the emitter from the container.

Related Packages
----------------

[](#related-packages)

- [`componenta/app-http`](../app-http/README.md) uses the emitter in the HTTP runtime.
- [`componenta/http-responder`](../http-responder/README.md) builds PSR-7 responses.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance91

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

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

43d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20490712?v=4)[Andrey Shelamkoff](/maintainers/Shelamkoff)[@Shelamkoff](https://github.com/Shelamkoff)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B4.1k](/packages/guzzlehttp-psr7)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k543.5M2.7k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k48](/packages/neuron-core-neuron-ai)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k17](/packages/tempest-framework)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

36789.4k2](/packages/telnyx-telnyx-php)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

185702.8k44](/packages/laudis-neo4j-php-client)

PHPackages © 2026

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