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.

1.2.0(9mo ago)09.0k—4.5%1MITPHPPHP ^8.1CI passing

Since Mar 9Pushed 9mo 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 1mo ago

READMEChangelog (3)Dependencies (13)Versions (4)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

38

—

LowBetter than 85% of packages

Maintenance56

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community9

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 ~252 days

Total

3

Last Release

295d ago

### Community

Maintainers

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

---

Top Contributors

[![codemasher](https://avatars.githubusercontent.com/u/592497?v=4)](https://github.com/codemasher "codemasher (23 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

7.9k1.0B3.2k](/packages/guzzlehttp-psr7)[psr/http-factory

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

1.9k692.9M1.9k](/packages/psr-http-factory)[pdeans/http

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

1466.2k3](/packages/pdeans-http)[chillerlan/php-httpinterface

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

1417.1k5](/packages/chillerlan-php-httpinterface)[workerman/psr7

PSR-7 message implementation that also provides common utility methods

1079.8k10](/packages/workerman-psr7)[sunrise/http-message

An HTTP message implementation based on PSR-7, PSR-17 and RFC-7230.

15112.3k15](/packages/sunrise-http-message)

PHPackages © 2026

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