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

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

httpsoft/http-emitter
=====================

Emitting of PSR-7 Response implementation

1.1.1(1y ago)8174.1k↓46.8%113MITPHPPHP ^7.4|^8.0CI failing

Since Aug 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/httpsoft/http-emitter)[ Packagist](https://packagist.org/packages/httpsoft/http-emitter)[ Docs](https://httpsoft.org/)[ RSS](/packages/httpsoft-http-emitter/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)Dependencies (5)Versions (8)Used By (13)

HTTP Emitter
============

[](#http-emitter)

[![License](https://camo.githubusercontent.com/4869039a770125c5ef4002ca0fcdca22c36f63700452a06a55af1fc4bf36d3ef/68747470733a2f2f706f7365722e707567782e6f72672f68747470736f66742f687474702d656d69747465722f6c6963656e7365)](https://packagist.org/packages/httpsoft/http-emitter)[![Latest Stable Version](https://camo.githubusercontent.com/221c803c22903b91af7844c4a3dcce33e65613a93cbafde62d21380ff4e902d4/68747470733a2f2f706f7365722e707567782e6f72672f68747470736f66742f687474702d656d69747465722f76)](https://packagist.org/packages/httpsoft/http-emitter)[![Total Downloads](https://camo.githubusercontent.com/e0141ab4688874442f7b5e35996ee1d0a1c34a1eecc1e4d8e31032e19c46abef/68747470733a2f2f706f7365722e707567782e6f72672f68747470736f66742f687474702d656d69747465722f646f776e6c6f616473)](https://packagist.org/packages/httpsoft/http-emitter)[![GitHub Build Status](https://github.com/httpsoft/http-emitter/workflows/build/badge.svg)](https://github.com/httpsoft/http-emitter/actions)[![GitHub Static Analysis Status](https://github.com/httpsoft/http-emitter/workflows/static/badge.svg)](https://github.com/httpsoft/http-emitter/actions)[![Scrutinizer Code Coverage](https://camo.githubusercontent.com/7ceef599d09d4524501a65cf0e880a6ac3b805064f520f2692e58082839c4b4b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68747470736f66742f687474702d656d69747465722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/httpsoft/http-emitter/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c2af67f711c4304a2d73448cc4308f80dabd68230506216dcc22b4a0fa9c3272/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68747470736f66742f687474702d656d69747465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/httpsoft/http-emitter/?branch=master)

This package emitting implementations of [Psr\\Http\\Message\\ResponseInterface](https://github.com/php-fig/http-message/blob/master/src/ResponseInterface.php) from [PSR-7 HTTP Message](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.md).

Documentation
-------------

[](#documentation)

- [In English language](https://httpsoft.org/docs/emitter).
- [In Russian language](https://httpsoft.org/ru/docs/emitter).

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

[](#installation)

This package requires PHP version 7.4 or later.

```
composer require httpsoft/http-emitter

```

Usage SapiEmitter
-----------------

[](#usage-sapiemitter)

```
use HttpSoft\Emitter\SapiEmitter;
use Psr\Http\Message\ResponseInterface;

/** @var ResponseInterface $response */
$response->getBody()->write('Content');

$emitter = new SapiEmitter();
$emitter->emit($response);
// Output result: 'Content'
```

By default, the entire content of the response is emitted. To emit the content in parts, it is necessary to specify a maximum buffer length:

```
$emitter = new SapiEmitter(8192);
$emitter->emit($response);
// Output result: 'Content'
```

Emitting only part of the content using the `Content-Range` header:

```
$emitter = new SapiEmitter(8192);
$emitter->emit($response->withHeader('Content-Range', 'bytes 0-3/7'));
// Output result: 'Cont'
```

To emitting only the status line and headers without a body, it is necessary to specify `true` as the second parameter:

```
$emitter = new SapiEmitter(8192);
$emitter->emit($response, true);
// Output result: ''
```

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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

Every ~265 days

Recently: every ~396 days

Total

7

Last Release

550d ago

### Community

Maintainers

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

---

Top Contributors

[![devanych](https://avatars.githubusercontent.com/u/20116244?v=4)](https://github.com/devanych "devanych (50 commits)")

---

Tags

emitterhttphttp-emitterhttp-messagephppsr-7httppsr-7http-messagephpemitterhttp-emitter

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[symfony/psr-http-message-bridge

PSR HTTP message bridge

1.3k320.9M982](/packages/symfony-psr-http-message-bridge)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28150.5k](/packages/phpro-http-tools)[mimmi20/browser-detector

Library to detect Browsers and Devices

48157.5k5](/packages/mimmi20-browser-detector)[httpsoft/http-server-request

Infrastructure for creating PSR-7 ServerRequest and UploadedFile

15127.7k33](/packages/httpsoft-http-server-request)

PHPackages © 2026

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