PHPackages                             ancarda/psr7-string-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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. ancarda/psr7-string-stream

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

ancarda/psr7-string-stream
==========================

Minimal string based PSR-7 StreamInterface implementation

1.4(1y ago)2120.6k↑189.5%34MITPHPPHP ^8.2

Since Aug 25Pushed 1y agoCompare

[ Source](https://github.com/ancarda/psr7-string-stream)[ Packagist](https://packagist.org/packages/ancarda/psr7-string-stream)[ RSS](/packages/ancarda-psr7-string-stream/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (8)Versions (8)Used By (4)

ancarda/psr7-string-stream
==========================

[](#ancardapsr7-string-stream)

*Minimal string based PSR-7 StreamInterface implementation*

[![License](https://camo.githubusercontent.com/3e916af0ce7e4796e96d3f10b7a843e30eb6a6f095a6601a578ac16377093c39/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d7465616c)](https://choosealicense.com/licenses/mit/)[![Latest Stable Version](https://camo.githubusercontent.com/05ea9a78402755baa0d5d0f82524ace7a5c1d8b3d3af2994596a6b0faaac4cff/68747470733a2f2f706f7365722e707567782e6f72672f616e63617264612f707372372d737472696e672d73747265616d2f762f737461626c65)](https://packagist.org/packages/ancarda/psr7-string-stream)[![Total Downloads](https://camo.githubusercontent.com/e84d8893dbb58d15b1907ac740e6e8e5ef95059001cb2ced4084f4499b1ef49d/68747470733a2f2f706f7365722e707567782e6f72672f616e63617264612f707372372d737472696e672d73747265616d2f646f776e6c6f616473)](https://packagist.org/packages/ancarda/psr7-string-stream)[![builds.sr.ht status](https://camo.githubusercontent.com/9b88a1c34cb78034162ea0741f1355f8fe627b4a1e5929cad161d295a0dd2f3f/68747470733a2f2f6275696c64732e73722e68742f7e616e63617264612f707372372d737472696e672d73747265616d2e737667)](https://builds.sr.ht/~ancarda/psr7-string-stream?)

PSR-7 String Stream was born out of frustration working with PSR-7's StreamInterface. Most implementations typically use PHP Streams, which aren't the best to work with. I've run into bugs where harmless operations on Requests, such as `withHeaders` causes the underlying Body's destructor to be called, which closes the underlying stream. Since resources can't be cloned, this can cause the body to be destroyed.

This package, as the name implies, implements StreamInterface using strings which will survive clone+destroy.

If you're using this in production,

```
composer require ancarda/psr7-string-stream

```

If you're just using this in functional or unit tests, it can go in your `require-dev` section:

```
composer require --dev ancarda/psr7-string-stream

```

Useful Links
------------

[](#useful-links)

- Source Code:
- Issue Tracker:
- Mailing List:

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance46

Moderate activity, may be stable

Popularity38

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 95.8% 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 ~420 days

Recently: every ~525 days

Total

6

Last Release

405d ago

PHP version history (3 changes)1.0PHP &gt;=7.1

1.3.1PHP ^7.3|^8.0

1.4PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![ancarda](https://avatars.githubusercontent.com/u/3399778?v=4)](https://github.com/ancarda "ancarda (23 commits)")[![johanmeiring](https://avatars.githubusercontent.com/u/1214876?v=4)](https://github.com/johanmeiring "johanmeiring (1 commits)")

---

Tags

mirrored-repositoryphp-librarypsr-7

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ancarda-psr7-string-stream/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)

PHPackages © 2026

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