PHPackages                             terablaze/psr7 - 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. terablaze/psr7

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

terablaze/psr7
==============

A fast PHP7 implementation of PSR-7 (A fork of nyholm/psr7, removing final clause from all classes making them extendable)

0122PHP

Since Jan 22Pushed 3y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

PSR-7 implementation
====================

[](#psr-7-implementation)

A super lightweight PSR-7 implementation. Very strict and very fast.

Installation
------------

[](#installation)

```
composer require terablaze/psr7
```

If you are using Symfony Flex then you get all message factories registered as services.

Usage
-----

[](#usage)

The PSR-7 objects do not contain any other public methods than those defined in the [PSR-7 specification](https://www.php-fig.org/psr/psr-7/).

### Create objects

[](#create-objects)

Use the PSR-17 factory to create requests, streams, URIs etc.

```
$psr17Factory = new \Terablaze\Psr7\Factory\Psr17Factory();
$request = $psr17Factory->createRequest('GET', 'https://teraboxx.com');
$stream = $psr17Factory->createStream('foobar');
```

### Sending a request

[](#sending-a-request)

With [HTTPlug](http://httplug.io/) or any other PSR-18 (HTTP client) you may send requests like:

```
composer require kriswallsmith/buzz
```

```
$psr17Factory = new \Terablaze\Psr7\Factory\Psr17Factory();
$psr18Client = new \Buzz\Client\Curl($psr17Factory);

$request = $psr17Factory->createRequest('GET', 'https://teraboxx.com');
$response = $psr18Client->sendRequest($request);
```

### Create server requests

[](#create-server-requests)

The [`terablaze/psr7-server`](https://github.com/terablaze/psr7-server) package can be used to create server requests from PHP superglobals.

```
composer require terablaze/psr7-server
```

```
$psr17Factory = new \Terablaze\Psr7\Factory\Psr17Factory();

$creator = new \Terablaze\Psr7Server\ServerRequestCreator(
    $psr17Factory, // ServerRequestFactory
    $psr17Factory, // UriFactory
    $psr17Factory, // UploadedFileFactory
    $psr17Factory  // StreamFactory
);

$serverRequest = $creator->fromGlobals();
```

### Emitting a response

[](#emitting-a-response)

```
composer require laminas/laminas-httphandlerrunner
```

```
$psr17Factory = new \Terablaze\Psr7\Factory\Psr17Factory();

$responseBody = $psr17Factory->createStream('Hello world');
$response = $psr17Factory->createResponse(200)->withBody($responseBody);
(new \Laminas\HttpHandlerRunner\Emitter\SapiEmitter())->emit($response);
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b739d7203a863b99d21a232feebb96c8b649bf0087f46cc3d905a64d53731f5?d=identicon)[tomiwahq](/maintainers/tomiwahq)

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

---

Top Contributors

[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (110 commits)")[![Zegnat](https://avatars.githubusercontent.com/u/490579?v=4)](https://github.com/Zegnat "Zegnat (25 commits)")[![tomiwahq](https://avatars.githubusercontent.com/u/19550920?v=4)](https://github.com/tomiwahq "tomiwahq (7 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (3 commits)")[![sunkan](https://avatars.githubusercontent.com/u/568492?v=4)](https://github.com/sunkan "sunkan (2 commits)")[![rancoud](https://avatars.githubusercontent.com/u/1884186?v=4)](https://github.com/rancoud "rancoud (2 commits)")[![iambrosi](https://avatars.githubusercontent.com/u/297102?v=4)](https://github.com/iambrosi "iambrosi (1 commits)")[![kamalkhan](https://avatars.githubusercontent.com/u/4675979?v=4)](https://github.com/kamalkhan "kamalkhan (1 commits)")[![mindplay-dk](https://avatars.githubusercontent.com/u/103348?v=4)](https://github.com/mindplay-dk "mindplay-dk (1 commits)")[![nickdnk](https://avatars.githubusercontent.com/u/8411314?v=4)](https://github.com/nickdnk "nickdnk (1 commits)")[![casahugo](https://avatars.githubusercontent.com/u/8735848?v=4)](https://github.com/casahugo "casahugo (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![ppetermann](https://avatars.githubusercontent.com/u/69334?v=4)](https://github.com/ppetermann "ppetermann (1 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (1 commits)")[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (1 commits)")[![Spomky](https://avatars.githubusercontent.com/u/1091072?v=4)](https://github.com/Spomky "Spomky (1 commits)")[![Tracerneo](https://avatars.githubusercontent.com/u/660285?v=4)](https://github.com/Tracerneo "Tracerneo (1 commits)")[![cseufert](https://avatars.githubusercontent.com/u/1734519?v=4)](https://github.com/cseufert "cseufert (1 commits)")[![andreybolonin](https://avatars.githubusercontent.com/u/2576509?v=4)](https://github.com/andreybolonin "andreybolonin (1 commits)")[![DavidPrevot](https://avatars.githubusercontent.com/u/3936728?v=4)](https://github.com/DavidPrevot "DavidPrevot (1 commits)")

### Embed Badge

![Health badge](/badges/terablaze-psr7/health.svg)

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

###  Alternatives

[maclof/kubernetes-client

A simple yet elegant client for accessing and controlling a Kubernetes cluster.

234907.8k4](/packages/maclof-kubernetes-client)[icamys/php-sitemap-generator

Simple PHP sitemap generator.

175356.9k7](/packages/icamys-php-sitemap-generator)[wyrihaximus/psr-15-cat

CAT!

124.3k2](/packages/wyrihaximus-psr-15-cat)

PHPackages © 2026

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