PHPackages                             chillerlan/psr-7 - 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. chillerlan/psr-7

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

chillerlan/psr-7
================

A PSR-7 HTTP message and PSR-17 HTTP factory implementation.

2.0.0(1w ago)010.2k↓14.3%1MITPHPPHP ^8.4CI passing

Since Mar 9Pushed 1w ago1 watchersCompare

[ Source](https://github.com/chillerlan/psr-7)[ Packagist](https://packagist.org/packages/chillerlan/psr-7)[ Docs](https://github.com/chillerlan/psr-7)[ Fund](https://ko-fi.com/codemasher)[ RSS](/packages/chillerlan-psr-7/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (23)Versions (6)Used By (1)

chillerlan/psr-7
================

[](#chillerlanpsr-7)

A [PSR-7](https://www.php-fig.org/psr/psr-7/)/[PSR-17](https://www.php-fig.org/psr/psr-17/) HTTP message and factory implementation.

[![PHP Version Support](https://camo.githubusercontent.com/4030e18f8b5fa58696dc13341e47c918e466518c51c0384346c57bc87572abd1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6368696c6c65726c616e2f7073722d373f6c6f676f3d70687026636f6c6f723d383839324246266c6f676f436f6c6f723d666666)](https://www.php.net/supported-versions.php)[![Packagist version](https://camo.githubusercontent.com/b27f978f4ae55ce52336954095439e855afe2a1f2f4d0d32c4f8490af8bc30c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368696c6c65726c616e2f7073722d372e7376673f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d666666)](https://packagist.org/packages/chillerlan/psr-7)[![License](https://camo.githubusercontent.com/24538988c16542d0dae1ec1977387e3e371f5a6d8ed680c622361f71ca5c2292/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6368696c6c65726c616e2f7073722d37)](https://github.com/chillerlan/psr-7/blob/main/LICENSE)[![Continuous Integration](https://camo.githubusercontent.com/8591e2e9cfbef52731a9a224404d5af4525afb33aaad8278bf3fccdbc7c0aca2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6368696c6c65726c616e2f7073722d372f63692e796d6c3f6272616e63683d6d61696e266c6f676f3d676974687562266c6f676f436f6c6f723d666666)](https://github.com/chillerlan/psr-7/actions/workflows/ci.yml?query=branch%3Amain)[![CodeCov](https://camo.githubusercontent.com/d071a5ca9b94c4949d0a42092ba3bf3543a090ea992d2198e62234a29456c37a/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f6368696c6c65726c616e2f7073722d372e7376673f6c6f676f3d636f6465636f76266c6f676f436f6c6f723d666666)](https://codecov.io/github/chillerlan/psr-7)[![Codacy](https://camo.githubusercontent.com/2281aadadf1cf70be956af3a7543639c4efe05bec8226e5aef0b19177724a40a/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f67726164652f33353738626633366235306434396230613136363064313463653036623534653f6c6f676f3d636f64616379266c6f676f436f6c6f723d666666)](https://app.codacy.com/gh/chillerlan/psr-7/dashboard)[![Packagist downloads](https://camo.githubusercontent.com/978c73cb4b1e31e480389b7862f67ea06e6ab00fced23a54787dfb0df275d263/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368696c6c65726c616e2f7073722d372e7376673f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d666666)](https://packagist.org/packages/chillerlan/psr-7/stats)

Overview
--------

[](#overview)

### Features

[](#features)

- [PSR-7](https://www.php-fig.org/psr/psr-7/) HTTP message implementation
- [PSR-17](https://www.php-fig.org/psr/psr-17/) HTTP factory implementation
- `MultipartStreamBuilder` based on PSR-7 `Message` objects ([RFC-2046, section 5.1](https://datatracker.ietf.org/doc/html/rfc2046#section-5.1))

### Requirements

[](#requirements)

- PHP 8.1+
    - [`ext-mbstring`](https://www.php.net/manual/book.mbstring.php)

Documentation
-------------

[](#documentation)

The documentation of the PSR-7 interfaces can be found over at .

**NOTE: This library has abandoned the paranoid "value object" "immuatbility" that is dictated by PSR-7 for it is horseshit. The pseudo-immutability gets in the way more often (always) than it is useful (never) and creates endless overhead. If you want your objects to be immutable for whatever reason, just fucking clone them and don't force countless libraries to do that for you instead. If you don't like it, just use Guzzle instead (spoiler: you won't notice the difference).**

### Auto generated API documentation

[](#auto-generated-api-documentation)

The API documentation can be auto generated with [phpDocumentor](https://www.phpdoc.org/). There is an [online version available](https://chillerlan.github.io/psr-7/) via the [gh-pages branch](https://github.com/chillerlan/psr-7/tree/gh-pages) that is [automatically deployed](https://github.com/chillerlan/psr-7/deployments) on each push to main.

Locally created docs will appear in `.build/phpdocs/`. If you'd like to create local docs, please follow these steps:

- [download phpDocumentor](https://github.com/phpDocumentor/phpDocumentor/releases) v3+ as .phar archive
- run it in the repository root directory:
    - on Windows `c:\path\to\php.exe c:\path\to\phpDocumentor.phar --config=phpdoc.xml`
    - on Linux just `php /path/to/phpDocumentor.phar --config=phpdoc.xml`
- open [index.html](./.build/phpdocs/index.html) in a browser
- profit!

Disclaimer
----------

[](#disclaimer)

Use at your own risk!

License information
-------------------

[](#license-information)

This library contains portions of code (tests) from the following libraries:

- [Guzzle PSR-7](https://github.com/guzzle/psr7) (MIT)
- [Slim](https://github.com/slimphp/Slim) (MIT)

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance78

Regular maintenance activity

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~209 days

Total

5

Last Release

8d ago

Major Versions

v1.x-dev → 2.0.02026-06-25

PHP version history (2 changes)1.0.0PHP ^8.1

2.0.0PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/592497?v=4)[smiley](/maintainers/codemasher)[@codemasher](https://github.com/codemasher)

---

Top Contributors

[![codemasher](https://avatars.githubusercontent.com/u/592497?v=4)](https://github.com/codemasher "codemasher (30 commits)")

---

Tags

httphttp-messagephpphp-libraryphp8psr-17psr-7requestresponsehttpresponserequestpsr-7streamurlmessageurifactorypsr-17

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/chillerlan-psr-7/health.svg)

```
[![Health](https://phpackages.com/badges/chillerlan-psr-7/health.svg)](https://phpackages.com/packages/chillerlan-psr-7)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

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

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k747.1M2.7k](/packages/psr-http-factory)[chillerlan/php-httpinterface

A PSR-7/17/18 http message/client implementation

1418.3k8](/packages/chillerlan-php-httpinterface)[pdeans/http

PSR-7 cURL HTTP client with support for PSR-17 HTTP factories.

1466.5k3](/packages/pdeans-http)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28150.5k](/packages/phpro-http-tools)[workerman/psr7

PSR-7 message implementation that also provides common utility methods

1185.6k12](/packages/workerman-psr7)

PHPackages © 2026

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