Hey all,
I'd like to highlight that, as of yesterday, MediaWiki code (and much more) no longer supports PHP 7.4 in its development branch.
MediaWiki already stopped officially supporting PHP 7.4 back in the MediaWiki 1.42 release a year ago[0] following the support policy for PHP[1], but as Wikimedia production was still running on 7.4, the development branches for most things continued to be tested with 7.4. As of this week, Wikimedia SRE completed the removal of the last traced use of PHP 7.4[2], and so we were able to decommission CI support[3] and land the official support change[4] from April 2024[5].
In practice, this should have no effect on anyone running a current or recent MediaWiki installation. People still running old versions of MediaWiki on PHP 7.4 or PHP 8.0 will have to upgrade their (out-of-support[6]) PHP version when they next upgrade MediaWiki, which we encourage. The only supported version of MediaWiki that can be run on PHP before 8.1.0 is MediaWiki 1.39, which goes end-of-life in six months' time, November 2025.
Developers will have to support fewer quirks and issues, and we can unwind some unnecessary scaffolding, oddities where features had to be adjusted in release branches. Most importantly, we will be unblocked in several areas where upstream libraries and tools had long-ago stopped supporting PHP 7.4.
As part of this, Wikimedia CI for MediaWiki itself, as well as all extensions, skins, libraries, and tools has been adjusted to test PHP 8.1–8.3 (or as appropriate). Wikimedia CI no longer has the facility to test in PHP 7.4. Work to support PHP 8.4 continues, and for those interested, there is a Phabricator board to track known issues[7].
This has been a long time coming, and I want to thank the very large number of people at Wikimedia across the MediaWiki group, SRE, and product teams, as well as many volunteers & others in the developer community, for their perseverance to get us to this point.
[0] - https://www.mediawiki.org/wiki/Compatibility [1] - https://www.mediawiki.org/wiki/Support_policy_for_PHP [2] - https://phabricator.wikimedia.org/T319432 [3] - https://gerrit.wikimedia.org/r/c/integration/config/+/1127083 [4] - https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1128015 [5] - https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1017958 [6] - https://www.php.net/supported-versions [7] - https://phabricator.wikimedia.org/project/view/6953/
Yours
Excellent news! If anyone needs a reminder about the features that Wikimedia-deployed PHP code can now use, I did a presentation https://commons.wikimedia.org/wiki/File:Cool_new_things_in_PHP_%E2%80%93_Wikimedia_Hackathon_2023.pdf at the 2023 hackathon (the new stuff in PHP 8 starts on slide 22). Alternatively, you can read through PHP’s full list of new features in PHP 8.0 https://www.php.net/manual/en/migration80.new-features.php and in PHP 8.1 https://www.php.net/manual/en/migration81.new-features.php (h/t Tim Starling).
Cheers, Lucas
Am Fr., 6. Juni 2025 um 17:16 Uhr schrieb James Forrester < jforrester@wikimedia.org>:
Hey all,
I'd like to highlight that, as of yesterday, MediaWiki code (and much more) no longer supports PHP 7.4 in its development branch.
MediaWiki already stopped officially supporting PHP 7.4 back in the MediaWiki 1.42 release a year ago[0] following the support policy for PHP[1], but as Wikimedia production was still running on 7.4, the development branches for most things continued to be tested with 7.4. As of this week, Wikimedia SRE completed the removal of the last traced use of PHP 7.4[2], and so we were able to decommission CI support[3] and land the official support change[4] from April 2024[5].
In practice, this should have no effect on anyone running a current or recent MediaWiki installation. People still running old versions of MediaWiki on PHP 7.4 or PHP 8.0 will have to upgrade their (out-of-support[6]) PHP version when they next upgrade MediaWiki, which we encourage. The only supported version of MediaWiki that can be run on PHP before 8.1.0 is MediaWiki 1.39, which goes end-of-life in six months' time, November 2025.
Developers will have to support fewer quirks and issues, and we can unwind some unnecessary scaffolding, oddities where features had to be adjusted in release branches. Most importantly, we will be unblocked in several areas where upstream libraries and tools had long-ago stopped supporting PHP 7.4.
As part of this, Wikimedia CI for MediaWiki itself, as well as all extensions, skins, libraries, and tools has been adjusted to test PHP 8.1–8.3 (or as appropriate). Wikimedia CI no longer has the facility to test in PHP 7.4. Work to support PHP 8.4 continues, and for those interested, there is a Phabricator board to track known issues[7].
This has been a long time coming, and I want to thank the very large number of people at Wikimedia across the MediaWiki group, SRE, and product teams, as well as many volunteers & others in the developer community, for their perseverance to get us to this point.
[0] - https://www.mediawiki.org/wiki/Compatibility [1] - https://www.mediawiki.org/wiki/Support_policy_for_PHP [2] - https://phabricator.wikimedia.org/T319432 [3] - https://gerrit.wikimedia.org/r/c/integration/config/+/1127083 [4] - https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1128015 [5] - https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1017958 [6] - https://www.php.net/supported-versions [7] - https://phabricator.wikimedia.org/project/view/6953/
Yours
James D. Forrester (he/him or they/themself) Wikimedia Foundation _______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
A few of the PHP 8.0 and 8.1 features are clear syntax improvements that could be fairly easily introduced in all of our existing code, and become required by our code style. For example, I think non-capturing `catch`, first-class callables, `match` expressions instead of `switch`, and trailing commas in function definitions should always be used if possible. If you'd like to help make that happen (or if you think it's not such a great idea), please join me at https://phabricator.wikimedia.org/T396813 .
wikitech-l@lists.wikimedia.org