Page MenuHomePhabricator

Decide minimum supported PHP version for next MLEB release
Closed, ResolvedPublic

Description

Currently we claim to support PHP 7.0.0 and above. https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle

MediaWiki 1.34 will require PHP 7.2.9 or above.

Our options are either keep it 7.0.0 until MediaWiki 1.35 is released, or already increase it to 7.2.

Keeping 7.0 support will be hard unless we find a way to enforce it via linters and automatic testing with that PHP versions. We should only do it if we can reasonable guarantee that it actually keeps working.

7.2 allows to use some new features, but nothing very significant. We automatically get testing on it and know it will work well.

Event Timeline

Translate is already incompatible in tests with 7.0, requires 7.1 after @MaxSem merged da6bfe8 due to void return type introduced in 7.1. A compromise would be to require 7.1 instead.

Another few reasons to go with PHP 7.1,

  1. Currently we are using Mediawiki Phan - 0.7.1, but if we upgrade to 0.8.0, we'll need PHP 7.2 (https://github.com/wikimedia/mediawiki-tools-phan/blob/master/composer.json#L13). This was already discussed on Gerrit on Change Id: I21251df7c5d45f0c803556b4bc4b7947f30d7cc1
  2. That patch (11bcb52dc61a) also introduces nullable types, which requires PHP 7.1
  3. PHP 7.0 has reached EOL

I think with this release we can go with PHP 7.1, in line with official PHP support. For the next MLEB release in Jan, 2020 we can bump up the minimum version to 7.2, in line with official PHP releases.

abi_ claimed this task.

As per discussion with Niklas, we've decided to keep the minimum PHP version for the current MLEB release as 7.1 and planning to make it 7.2 for the next release.

Change 565812 had a related patch set uploaded (by Abijeet Patro; owner: Abijeet Patro):
[mediawiki/extensions/Translate@master] build: Explicitly require PHP >= 7.2, per MLEB 2020.01 baseline

https://gerrit.wikimedia.org/r/565812

Change 565812 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] build: Explicitly require PHP >= 7.2, per MLEB 2020.01 baseline

https://gerrit.wikimedia.org/r/565812