PHPackages                             forme/wp-rest-api-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. [HTTP &amp; Networking](/categories/http)
4. /
5. forme/wp-rest-api-psr7

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

forme/wp-rest-api-psr7
======================

Provides PSR-7 and WP REST API Response and Request classes

v1.0.0(3mo ago)0191MITPHP

Since Mar 11Pushed 3mo agoCompare

[ Source](https://github.com/formewp/wp-rest-api-psr7)[ Packagist](https://packagist.org/packages/forme/wp-rest-api-psr7)[ RSS](/packages/forme-wp-rest-api-psr7/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (6)Versions (2)Used By (1)

WP REST API PSR-7
=================

[](#wp-rest-api-psr-7)

WP REST API PSR-7 is a small library which creates a bridge between the PSR-7 standards and interfaces and the WordPress REST API Response and Request classes. You can include it via composer in any theme or plugin which needs this.

More Detail
-----------

[](#more-detail)

Development for the WordPress REST API started before the [PSR-7](https://www.php-fig.org/psr/psr-7/) was finalized. This standard made a great way for different libraries to be able to interact using a common interface. Unfortunately, since WordPress missed it, the standard [WP\_REST\_Request](https://developer.wordpress.org/reference/classes/wp_rest_request/) and [WP\_REST\_Response](https://developer.wordpress.org/reference/classes/wp_rest_response/) classes are not PSR-7 compliant.

This means that any library which extends HTTP Messages using the PSR-7 standard are not compatible with WordPress by default. Bummer! Our team ran into this limitation when attempting to use the [OAuth2 Server](https://github.com/thephpleague/oauth2-server) library.

When would I need this?
-----------------------

[](#when-would-i-need-this)

This is the sort of thing where you don't need it until you do and when you do you'll know it's missing. 🙂

Things to keep in mind
----------------------

[](#things-to-keep-in-mind)

When generating a `WP_REST_PSR7_Request` from a request, the body is passed directly to the PSR-7 body stream. This means that any validation and sanitization that `WP_REST_Server` provides may not be applied. Be aware of this and make sure that sanitization and validation are applied if the library does not.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance80

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

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

Unknown

Total

1

Last Release

105d ago

### Community

Maintainers

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

---

Top Contributors

[![Alexnortung](https://avatars.githubusercontent.com/u/1552267?v=4)](https://github.com/Alexnortung "Alexnortung (9 commits)")[![JasonTheAdams](https://avatars.githubusercontent.com/u/2024145?v=4)](https://github.com/JasonTheAdams "JasonTheAdams (1 commits)")[![moussaclarke](https://avatars.githubusercontent.com/u/13017858?v=4)](https://github.com/moussaclarke "moussaclarke (1 commits)")

---

Tags

psr-7wordpresswp-rest-api

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/forme-wp-rest-api-psr7/health.svg)

```
[![Health](https://phpackages.com/badges/forme-wp-rest-api-psr7/health.svg)](https://phpackages.com/packages/forme-wp-rest-api-psr7)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.1B3.8k](/packages/guzzlehttp-psr7)[symfony/psr-http-message-bridge

PSR HTTP message bridge

1.3k312.3M929](/packages/symfony-psr-http-message-bridge)[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

537226.9M39](/packages/league-uri-interfaces)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28146.3k](/packages/phpro-http-tools)[mezzio/mezzio

PSR-15 Middleware Microframework

3903.8M120](/packages/mezzio-mezzio)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

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