Add support for psr/http-message v2

Open
#513 20 comments 29 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
php
Domain
api

Research direction

Start by reviewing the compatibility discussion in #485 and the current dependency on ringcentral/psr7, then trace how psr/http-message v1 is supported across the currently supported PHP versions. Add the required older-PHP workarounds, remove ringcentral/psr7, and include tests covering psr/http-message v2 compatibility.

Written by the indexing model from the issue text.

Description

new feature

I recommend adding support for psr/http-message v2, which was released in April and requires PHP 7.2+. To ensure compatibility with psr/http-message v2 across all currently supported versions in http (PHP 5.3+), we will need to implement some additional workarounds for older PHP versions. These workarounds are necessary not only for the current v1 of http, but also for the upcoming v3, which will support PHP 7.1+. We will also need to include additional tests to ensure our compatibility with psr/http-message v2.

Additionally we need to remove the dependency for ringcentral/psr7 as discussed in #485, which currently has a dependency on psr/http-message v1. This project has not received updates since 2020, and it is unlikely to receive support for psr/http-message v2 anytime soon. To ensure compatibility with psr/http-message v2, we must first remove ringcentral/psr7.

I'll update this ticket as we make progress 👍

If you need this feature urgently, you can always reach out to us or help us prioritizing by becoming a sponsor and supporting the ReactPHP ecosystem ❤️

Dominant language
PHP
Stars
781
Forks
166
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reactphp/http

All issues in reactphp/http

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.