- 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.
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):
See also complete pingback statistics. From MW 1.29, there are more installations with PHP 7.0 than 5.6.
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.
|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)|
MediaWiki version lifecycle
|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|