PHPackages                             giggsey/psr7-stream-response - 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. giggsey/psr7-stream-response

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

giggsey/psr7-stream-response
============================

Build a File Response from a PSR-7 Stream

1.1.0(2y ago)566.1k—1.4%1MITPHPPHP &gt;=8.0

Since Aug 8Pushed 1y ago2 watchersCompare

[ Source](https://github.com/giggsey/psr7-stream-response)[ Packagist](https://packagist.org/packages/giggsey/psr7-stream-response)[ RSS](/packages/giggsey-psr7-stream-response/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (8)Used By (0)

PSR-7 Stream Response
=====================

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

Why?
----

[](#why)

Symfony's BinaryFileResponse allows presenting files to download to HTTP Clients. However, this expects full file paths. Some projects may want to stream a PSR-7 Stream to the client instead.

How to use
----------

[](#how-to-use)

Instead of returning a BinaryFileResponse, create a PSR7StreamResponse, and return that.

### Before

[](#before)

```
$response = new BinaryFileResponse($filePath);
$response = $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, 'my-file.mp3');

return $response;
```

### After

[](#after)

```
$response = new PSR7StreamResponse($stream, 'audio/mpeg');
$response = $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, 'my-file.mp3');

return $response;
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~345 days

Recently: every ~518 days

Total

7

Last Release

768d ago

Major Versions

0.1.4 → 1.0.02023-06-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/ecb77e06c21edac6b84d9428a23c632eb08a96f897de0bde76dd467846ded35a?d=identicon)[giggsey](/maintainers/giggsey)

---

Top Contributors

[![giggsey](https://avatars.githubusercontent.com/u/305730?v=4)](https://github.com/giggsey "giggsey (8 commits)")[![joshuagiggxon](https://avatars.githubusercontent.com/u/35339413?v=4)](https://github.com/joshuagiggxon "joshuagiggxon (1 commits)")[![miguelaguero](https://avatars.githubusercontent.com/u/655910?v=4)](https://github.com/miguelaguero "miguelaguero (1 commits)")

### Embed Badge

![Health badge](/badges/giggsey-psr7-stream-response/health.svg)

```
[![Health](https://phpackages.com/badges/giggsey-psr7-stream-response/health.svg)](https://phpackages.com/packages/giggsey-psr7-stream-response)
```

###  Alternatives

[symfony/psr-http-message-bridge

PSR HTTP message bridge

1.3k296.6M807](/packages/symfony-psr-http-message-bridge)[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

536204.9M23](/packages/league-uri-interfaces)[api-platform/http-cache

API Platform HttpCache component

223.2M7](/packages/api-platform-http-cache)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)[openswoole/core

Openswoole core library

181.1M32](/packages/openswoole-core)

PHPackages © 2026

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