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)911.0k3[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 2d 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 66% 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

2865d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2024145?v=4)[Jason Adams](/maintainers/JasonTheAdams)[@JasonTheAdams](https://github.com/JasonTheAdams)

---

Top Contributors

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

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

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

PSR HTTP message bridge

1.3k320.9M983](/packages/symfony-psr-http-message-bridge)[mezzio/mezzio

PSR-15 Middleware Microframework

3923.8M126](/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.

35789.4k2](/packages/telnyx-telnyx-php)[sunrise/http-router

A powerful solution as the foundation of your project.

17451.6k10](/packages/sunrise-http-router)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28150.5k](/packages/phpro-http-tools)

PHPackages © 2026

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