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(3mo ago)583.5k↓50.4%1MITPHPPHP &gt;=8.2CI passing

Since Aug 8Pushed 3mo 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 2w 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

57

—

FairBetter than 98% of packages

Maintenance82

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

91d 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

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k886.6M9.7k](/packages/symfony-http-kernel)[moonshine/moonshine

Laravel administration panel

1.3k268.2k89](/packages/moonshine-moonshine)[api-platform/core

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

2.6k52.2M378](/packages/api-platform-core)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[laravel/nightwatch

The official Laravel Nightwatch package.

36911.6M45](/packages/laravel-nightwatch)

PHPackages © 2026

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