WordPress / WordPress/Requests

Announcement: dropping support for PHP < 7.2

Open
#983 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: meta
Dominant language
PHP
Stars
3.6k
Forks
500
Avg merge
2d 21h
Merged PRs (30d)
5

Description

Setting the scene

At this time, Requests is compatible with PHP 5.6+, 7.x, and 8.x

This is a very wide range and is a compatibility span of more than a decade.

With this ticket, I'd like to propose limiting the range of supported versions a little.

Proposal

I would like to propose to drop support for PHP < 7.2

Planning

Requests 2.1.0 is intended to be a security and stability release.

Security fixes should be available to the widest range of PHP versions possible, so knowing we'll include security fixes in the 2.1.0 release, means that is not the right time for a PHP version drop.

So the proposal would be to drop support for PHP < 7.2 in Requests 2.2.0 and for that version to be released quite quickly after the Requests 2.1.0 release.

Consequences

The fast majority of packages using Requests pull Requests in via Composer (with the big exception being WordPress).

For Composer users, Composer will handle the version negotiation and can still install the 2.0.x or 2.1.x version if necessary.

Based on the PHP version stats available via Packagist, the PHP version drop would affect 2.2% of the users of this package.

As for WordPress... WordPress has dropped support for PHP < 7.2 in WordPress 6.6, which was released in July 2024.
Support for PHP < 5.6 was dropped in WordPress 5.2, which was released in May 2019.

WordPress has a liberal security backport policy and AFAICS, backports are still being done as far back as WordPress 4.7, which means that security patches currently would already need to be made compatible with older PHP versions than the ones supported by Requests.
With that in mind, I don't think WordPress using Requests and backporting security fixes should be regarded as a blocker for Requests dropping support for PHP < 7.2.

Opinions ?

Contributor guide

Open the contributing guide

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.

Research direction

The issue names Composer and Requests 2.2.0 but no files, tests, or entry points. Start by resolving the support-policy proposal and identify the compatibility checks that would need updating; done means an agreed PHP >= 7.2 policy is reflected consistently for the 2.2.0 release.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.