PHPackages                             papertower/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. papertower/wp-rest-api-psr7

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

papertower/wp-rest-api-psr7
===========================

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

0.8(7y ago)910.7k3[1 issues](https://github.com/papertower/WP-REST-API-PSR7/issues)[1 PRs](https://github.com/papertower/WP-REST-API-PSR7/pulls)1MITPHP

Since Aug 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/papertower/WP-REST-API-PSR7)[ Packagist](https://packagist.org/packages/papertower/wp-rest-api-psr7)[ RSS](/packages/papertower-wp-rest-api-psr7/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)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

31

—

LowBetter than 68% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity31

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

Unknown

Total

1

Last Release

2819d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91bc7e12dec457c1eb335c981a01a67a93985a88169e12b12345e82f80dd4c67?d=identicon)[JasonTheAdams](/maintainers/JasonTheAdams)

---

Top Contributors

[![JasonTheAdams](https://avatars.githubusercontent.com/u/2024145?v=4)](https://github.com/JasonTheAdams "JasonTheAdams (3 commits)")

---

Tags

psr-7wordpresswp-rest-api

### Embed Badge

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

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

###  Alternatives

[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

536204.9M23](/packages/league-uri-interfaces)[laminas/laminas-psr7bridge

Bidirectional conversions between PSR-7 and laminas-http messages

117.9M18](/packages/laminas-laminas-psr7bridge)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28483.0k2](/packages/mezzio-mezzio-authentication-oauth2)[mezzio/mezzio-authentication

Authentication middleware for Mezzio and PSR-7 applications

121.6M26](/packages/mezzio-mezzio-authentication)[jimtools/jwt-auth

PSR-15 JWT Authentication middleware, A replacement for tuupola/slim-jwt-auth

20142.3k3](/packages/jimtools-jwt-auth)

PHPackages © 2026

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