It is generally a good idea to drop support for old things in an LTS, otherwise we are stuck supporting them for 3 years, and are either stuck with them for the next three releases as well, or will have a hard time with backports. Wikimedia production is still using PHP 7.2 so I recommend dropping 7.2 support in the upcoming 1.35 release but keeping it in master until Wikimedia is ready to move. This is similar to what we have done in the past with PHP 5 (T172165).
Impact
- PHP 7.3 has some nice new features (e.g. more reasonable heredoc/nowdoc syntax, trailing commas in function calls, JSON_THROW_ON_ERROR); we can only use those if we drop 7.2. While dropping or keeping 7.2 support does not make that much difference for new feature development, it does make backports (and maintenance of extensions using the master or LTS compatibility policy) easier.
- Requiring 7.3 means we can take support for Argon2id (the current best practice in password hashing) for granted.
- mb_* functions work significantly differently in 7.2 and 7.3, and PCRE expressions have also changed somewhat so supporting them in parallel would probably be annoying and make introducing security issues easier.
- Supporting 7.2 in the LTS version would mean committing to keep it on our CI boxes for 3 more years. (Per T257879#6348477 that is acceptable.)
- Parsoid (intended to be an out-of-the-box experience with MW 1.35 and the VisualEditor extension) doesn't perform well on 7.2 without manual tweaking ( T230861)
Policy
Per Support policy for PHP, the requirements for which PHP versions to support in a given release are:
- A PHP version that will be supported by the upstream PHP Group for the full duration of that MediaWiki major release cycle (from our planned release date until our planned end-of-life date).
- PHP 7.4 qualifies. (1)
- A PHP version that is provided by a Debian Linux LTS release channel that will be supported for the duration of that MediaWiki release.
- A PHP version that is provided by an Ubuntu Linux LTS release channel that will be supported for the duration of that MediaWiki release.
- For every Debian Linux LTS and Ubuntu Linux LTS release there must be at least one compatible MediaWiki version that is supported at the time the Linux distribution's LTS period starts.
- LTS releases that start during the lifetime of MediaWiki 1.35: Stretch (2020 July - 2022 June, PHP 7.0), Buster (2022 July - 2024 June, PHP 7.3), Focal (2020 April - 2025 April, PHP 7.4). 7.0 is supported by MediaWiki 1.31 for another year; 7.3 and 7.4 are supported by MediaWiki 1.35. Check.
- At any given point in time, there must be at least one combination of Debian Linux LTS and MediaWiki that both parties support for an overlapping period of two years. Thus allowing a site operator to remain on a given combination for 2 years (with support), before upgrading to the next supported combination. The same applies to Ubuntu Linux LTS as well.
Thus, all of the policy requirements are met.