Track PHP 8.1 support in hosting and distributions

Created on 13 July 2021, over 3 years ago
Updated 9 July 2024, 5 months ago

Problem/Motivation

The policy issue at #3173787: [policy] Require PHP 8.1 for Drupal 10.0 if a dependency does, otherwise require PHP 8.0. (up from 7.3 in Drupal 9) β†’ suggests we should require PHP 8.0 at least for Drupal 10. This is an absolute must if Drupal 10 is to be shipped with Symfony 6 which we are aiming for. However based on hosting provider data, Linux distribution support and other factors, we should consider whether to require PHP 8.1 outright or at least have a plan for requiring it later on in Drupal 10's lifecycle.

This is similar to #2917655: [9.4.x only] Drop official PHP 7.3 support in Drupal 9.4 β†’ .

Proposed resolution

Gather data about Linux distribution and hosting provider support.

Hosting provider support

Tracked in: #3261443: [tracking issue] Track hosting provider support for PHP 8+ β†’ (Please add/update data there for your HSP!)

Ubuntu

  • April 2020 -- Ubuntu 20.04 "Focal" -- PHP 7.2
  • Expected April 2022 -- Ubuntu 22.04 :Jammy" -- both PHP 8.0 and 8.1 (one may be removed before release?)

Debian

  • Aug. 2021 -- Debian 11 "Bullseye" -- PHP 7.4
  • Expected mid to late 2023 -- Debian 12 "Bookworm" -- PHP 8.1

RHEL

  • November 2021 -- RHEL 8 -- PHP 7.4
  • Expected May 2022 -- RHEL 9 (beta) -- PHP 8.0
  • Possibly November 2022 -- RHEL 9.1 -- PHP 8.1 support could be added, but this is only conjecture

(Note: CentOS is going EOL.)

Composer ecosystem data -- all Composer package installs


Source: https://packagist.org/php-statistics

Composer ecosystem data -- Drupal 9 installs of drupal/core


Source: https://packagist.org/packages/drupal/core/php-stats#9

Updated April 11th 2023:

Drupal 9:

Drupal 10:

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
OtherΒ  β†’

Last updated about 8 hours ago

Created by

πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom catch

    Added two new screenshots to the issue summary.

    17% of Drupal 10 sites are on PHP 8.2, 83% on PHP 8.1, not really any other options.

    47% of Drupal 9 sites are on PHP 8.1, 23% use PHP 8.0, 26% are on PHP 7.4

    PHP 8.1 has gone from ~10% to ~50% of Drupal 9 sites in the past eight months, so that is not bad progress overall.

    This means ~50% of Drupal 9 sites can't currently update on their present infrastructure, but there's also rapid adoption of PHP 8.1 which suggests lots of them are getting ready or at least off 7.4. Main question I guess is how many are left on PHP 8.0 and PHP 7.4 in November/December.

    I think we should keep this open still, but not critical any more, so moving to major. We should also start a similar issue for Drupal 11 PHP requirement support.

    I was surprised to see so many Drupal 10 sites on PHP 8.2, but it kind of makes sense given they were released around the same time, so for people starting brand new sites (or migrating from to Drupal 7) it would be an easy choice.

  • πŸ‡¬πŸ‡§United Kingdom catch

    Fixing the order of images in the image summary.

  • πŸ‡¬πŸ‡§United Kingdom catch
  • πŸ‡¬πŸ‡§United Kingdom catch

    There's an interesting thing (depending on your definition of interesting) happening on packagist with Drupal 9 php stats:
    https://packagist.org/packages/drupal/core/php-stats#9

    At the end of 2023, PHP 7.4 was 16% of installs with PHP 8.1 at 65% and PHP 8.0 at 10%

    Now PHP 7.4 is 29% of installs, PHP 8.1 is 53% and PHP 8.2 is 7.5%, PHP 8.0 down to less than 5%.

    So PHP 7.4 usage is a higher percentage, while PHP 8.0 has been almost squeezed out by 8.1 and 8.2.

    Drupal 9 usage has gone down by approximately 30-40,000 in the same time period as sites update to Drupal 10.

    So what this shows is that the sites that were already on PHP 8.0 or PHP 8.1 have either updated to Drupal 10 already, or in some cases updated to PHP 8.2 (likely in preparation for a 10.x update). But then there is a rump of 9.x sites still on 7.4 that have neither updated their PHP version nor their Drupal version and are drifting further behind.

    Some percentage of those 9.5 sites on 7.4 will update their PHP version and Drupal version at the same time.

    This only gives us an idea of package installs though - there will be 9.5 sites that haven't run composer update/install at all and those won't register in the stats.

  • πŸ‡¬πŸ‡§United Kingdom catch

    There's an interesting thing (depending on your definition of interesting) happening on packagist with Drupal 9 php stats:
    https://packagist.org/packages/drupal/core/php-stats#9

    At the end of 2023, PHP 7.4 was 16% of installs with PHP 8.1 at 65% and PHP 8.0 at 10%

    Now PHP 7.4 is 29% of installs, PHP 8.1 is 53% and PHP 8.2 is 7.5%, PHP 8.0 down to less than 5%.

    So PHP 7.4 usage is a higher percentage, while PHP 8.0 has been almost squeezed out by 8.1 and 8.2.

    Drupal 9 usage has gone down by approximately 30-40,000 in the same time period as sites update to Drupal 10.

    So what this shows is that the sites that were already on PHP 8.0 or PHP 8.1 have either updated to Drupal 10 already, or in some cases updated to PHP 8.2 (likely in preparation for a 10.x update). But then there is a rump of 9.x sites still on 7.4 that have neither updated their PHP version nor their Drupal version and are drifting further behind.

    Some percentage of those 9.5 sites on 7.4 will update their PHP version and Drupal version at the same time.

    This only gives us an idea of package installs though - there will be 9.5 sites that haven't run composer update/install at all and those won't register in the stats.

Production build 0.71.5 2024