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. ancarda/psr7-string-stream

ActiveLibrary

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

Minimal string based PSR-7 StreamInterface implementation

1.4(11mo ago)292.4k↑37.9%34MITPHPPHP ^8.2

Since Aug 25Pushed 11mo 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 1mo 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 95% of packages

Maintenance50

Moderate activity, may be stable

Popularity36

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity75

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

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

[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

536204.9M23](/packages/league-uri-interfaces)[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[simplesamlphp/saml2

SAML2 PHP library from SimpleSAMLphp

30317.2M40](/packages/simplesamlphp-saml2)[php-heroku-client/php-heroku-client

A PHP client for the Heroku Platform API

24404.8k4](/packages/php-heroku-client-php-heroku-client)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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