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 Symfony Response from a PSR-7 Stream

1.2.0(1mo ago)580.8k↓49.1%1MITPHPPHP &gt;=8.2CI passing

Since Aug 8Pushed 1mo 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 3d ago

READMEChangelog (8)Dependencies (7)Versions (10)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

59

—

FairBetter than 98% of packages

Maintenance90

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 88.9% 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 ~406 days

Recently: every ~553 days

Total

8

Last Release

46d ago

Major Versions

0.1.4 → 1.0.02023-06-26

PHP version history (2 changes)0.1.4PHP &gt;=8.0

1.2.0PHP &gt;=8.2

### 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 (16 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)")

###  Code Quality

TestsPest

### 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

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

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

Provides a structured process for converting a Request into a Response

8.1k869.4M8.8k](/packages/symfony-http-kernel)[symfony/psr-http-message-bridge

PSR HTTP message bridge

1.3k320.9M983](/packages/symfony-psr-http-message-bridge)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k51.2M339](/packages/api-platform-core)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[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)
