Current proposal
- MediaWiki 1.31 will require either PHP 7.0 or later, or HHVM.
- Developers will target the common subset of HHVM (with hhvm.php7.all = false) and PHP 7.0+.
- CI will enforce the use of this common subset using phpcs and/or phan rules
- These changes will be deferred until MediaWiki in WMF production is fully migrated to a compatible environment. See the subtasks of this RFC. The deadline for this work is April 1, 2018.
Rationale
Pingbacks
Current PHP version statistics (as of 2018-03-04) from install pingbacks (this feature was introduced in 1.28 so all this data is from the era when PHP 5.5 was required):
Count | PHP version |
---|---|
16429 | 5.6 |
15566 | 7.0 |
8643 | 7.1 |
2870 | 5.5 |
1370 | 7.2 |
See also complete pingback statistics. From MW 1.29, there are more installations with PHP 7.0 than 5.6.
WMF
One obstacle is that while WMF uses HHVM for MediaWiki, some other services are using Zend PHP, so we can't bump the requirements until all appservers have been updated to Debian Stretch.
External support
PHP Security Support | Debian support | Ubuntu support | Fedora support | PHPUnit | |
---|---|---|---|---|---|
PHP 5.5 | ended July 2016 | none | until April 2019 (Ubuntu 14 Trusty) | none | ended Feb 2017 (PHPUnit 4) |
PHP 5.6 | until Dec 2018 | until April 2020 (Debian Jessie) | none | ended Aug 2017 (Fedora 24) | ended Feb 2018 (PHPUnit 5) |
PHP 7.0 | until Dec 2018 | until June 2022 (Debian Stretch) | until April 2021 (Ubuntu 16 Xenial) | until Dec 2017 (Fedora 25) | until Feb 2019 (PHPUnit 6) |
PHP 7.1 | until Dec 2019 | future | future | until Aug 2018 (Fedora 26) | future |
PHPUnit support: We're currently using PHPUnit 4.x (https://phpunit.de/), and have to because we run the tests on PHP 5.5 in CI and newer PHPUnit versions require at least PHP 5.6.
PHPUnit 4 | Supported PHP 5.3 - PHP 5.6 | No longer supported (March 2014 - Feb 2017) |
PHPUnit 5 | Supports PHP 5.6 - PHP 7.1 | Legacy support (Oct 2015 - Feb 2018) |
PHPUnit 6 | Supports PHP 7.0 - PHP 7.1 | Current stable (Feb 2017 - Feb 2019) |
PHP Security support: http://php.net/supported-versions.php, http://php.net/eol.php
Distro support: https://wiki.debian.org/LTS, https://wiki.ubuntu.com/Releases, https://fedoraproject.org/wiki/End_of_life, https://apps.fedoraproject.org/packages/php
MediaWiki version lifecycle
https://www.mediawiki.org/wiki/Version_lifecycle / https://www.mediawiki.org/wiki/Compatibility
Release | PHP | EOL |
---|---|---|
MediaWiki 1.27 LTS | PHP 5.5 - 7.1 | June 2019 |
MediaWiki 1.28 | PHP 5.5 - 7.0 | November 2017 |
MediaWiki 1.29 | PHP 5.5 - 7.1 | July 2018 |
MediaWiki 1.30 | PHP 5.5 - 7.1 | November 2018 |
MediaWiki 1.31 LTS | TBD | June 2021 |
See also: