PHPackages                             wyrihaximus/react-psr-7-stream - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. wyrihaximus/react-psr-7-stream

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wyrihaximus/react-psr-7-stream
==============================

🎁 Decorate ReactPHP streams as PSR-7 streams

00[2 PRs](https://github.com/WyriHaximus/reactphp-psr-7-stream/pulls)PHP

Since Dec 5Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/WyriHaximus/reactphp-psr-7-stream)[ Packagist](https://packagist.org/packages/wyrihaximus/react-psr-7-stream)[ RSS](/packages/wyrihaximus-react-psr-7-stream/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

ReactPHP PSR-7 Stream
=====================

[](#reactphp-psr-7-stream)

🎁 Decorate ReactPHP streams as PSR-7 streams

[![Continuous Integration](https://github.com/wyrihaximus/reactphp-psr-7-stream/workflows/Continuous%20Integration/badge.svg)](https://github.com/wyrihaximus/reactphp-psr-7-stream/workflows/Continuous%20Integration/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/6cf0c6431b0e6f24605186e080635675d17b01206dc37b292f5e35e6a8d02f00/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f72656163742d7073722d372d73747265616d2f762f737461626c652e706e67)](https://packagist.org/packages/wyrihaximus/react-psr-7-stream)[![Total Downloads](https://camo.githubusercontent.com/e61f15cec2d226d126b43086e9f6ee52e85003dab3ff71d5823fe99f000a1c44/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f72656163742d7073722d372d73747265616d2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/wyrihaximus/react-psr-7-stream/stats)[![Code Coverage](https://camo.githubusercontent.com/16117d12ecf4e5449f6e23fe3397ec644c6ef85918405cfc4d6d2736c924f9ef/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f57797269486178696d75732f72656163747068702d7073722d372d73747265616d2f62616467652e7376673f6272616e63686d61696e)](https://coveralls.io/github/WyriHaximus/reactphp-psr-7-stream?branch=main)[![Type Coverage](https://camo.githubusercontent.com/2bef4b55e8dc9e1cba9e1342271a8a83f90103e2750323265ffca12c79c21799/68747470733a2f2f73686570686572642e6465762f6769746875622f57797269486178696d75732f72656163747068702d7073722d372d73747265616d2f636f7665726167652e737667)](https://shepherd.dev/github/WyriHaximus/reactphp-psr-7-stream)[![License](https://camo.githubusercontent.com/32aee313403ccc8e9144742c50a46388e968482c905652b01278c8fac67332c1/68747470733a2f2f706f7365722e707567782e6f72672f77797269686178696d75732f72656163742d7073722d372d73747265616d2f6c6963656e73652e706e67)](https://packagist.org/packages/wyrihaximus/react-psr-7-stream)

Installation
============

[](#installation)

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require wyrihaximus/react-psr-7-stream

```

Usage
=====

[](#usage)

This package assumes you run all code using it inside fibers. The following example makes a HTTP request using [`react/http`](https://reactphp.org/http/#streaming-response), decorates the body, and loops over it until the full body has been received. Important, while looping, do not use any other [`await`](https://reactphp.org/async/#await)calls whatsoever inside the loop. Doing so might make you miss a `data` event from the `ReadableStreamInterface`. This package is build for high performance low memory usage, it will not buffer data for you.

```
$response = await((new Browser())->requestStreaming('GET', 'https://example.com'));
assert($response instanceof ResponseInterface);
$body = $response->getBody();
assert($body instanceof ReadableStreamInterface);
$stream = new Stream($body);
while (! $stream->eof()) {
    handleDataChunk($stream->read(PHP_INT_MAX));
}
```

License
=======

[](#license)

The MIT License (MIT)

Copyright (c) 2023 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance43

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147145?v=4)[Cees-Jan Kiewiet](/maintainers/WyriHaximus)[@WyriHaximus](https://github.com/WyriHaximus)

---

Top Contributors

[![WyriHaximus](https://avatars.githubusercontent.com/u/147145?v=4)](https://github.com/WyriHaximus "WyriHaximus (6 commits)")

### Embed Badge

![Health badge](/badges/wyrihaximus-react-psr-7-stream/health.svg)

```
[![Health](https://phpackages.com/badges/wyrihaximus-react-psr-7-stream/health.svg)](https://phpackages.com/packages/wyrihaximus-react-psr-7-stream)
```

###  Alternatives

[diesdasdigital/kirby-meta-knight

Meta Knight – SEO for Kirby

11025.9k](/packages/diesdasdigital-kirby-meta-knight)

PHPackages © 2026

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