Page MenuHomePhabricator

Make MediaWiki core compatible with PHP 7.4
Open, LowPublic

Description

Since PHP 7.4 has a release candidate, it can be considered nearly stable. Now we can start thinking about the compatibility.

The following is the problems from phpunit unit test:

Function ReflectionType::__toString() is deprecated

tests/phpunit/unit/includes/watcheditem/NoWriteWatchedItemStoreUnitTest.php:225
tests/phpunit/MediaWikiUnitTestCase.php:110
maintenance/doMaintenance.php:99
  • Deprecated: Array and string offset access syntax with curly braces is deprecated in avro-php lib. (php-7.4.0RC1 note)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 16 2019, 2:20 PM
RazeSoldier updated the task description. (Show Details)Sep 16 2019, 2:28 PM

Change 537139 had a related patch set uploaded (by TK-999; owner: TK-999):
[avro-php@master] protocol: Fix compatibility with PHP 7.4

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

TK-999 added a subscriber: TK-999.Sep 16 2019, 3:19 PM

The issue in the RemexHTML lib seems to have been fixed in https://gerrit.wikimedia.org/r/c/mediawiki/libs/RemexHtml/+/531022.

The issue in the RemexHTML lib seems to have been fixed in https://gerrit.wikimedia.org/r/c/mediawiki/libs/RemexHtml/+/531022.

Yep, but MW is still using the old version. May need update dependence.

Change 537181 had a related patch set uploaded (by TK-999; owner: TK-999):
[mediawiki/core@master] services: Do not use deprecated ReflectionType::__toString() in tests

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

Change 537188 had a related patch set uploaded (by TK-999; owner: TK-999):
[mediawiki/core@master] SectionProfiler: Do not attempt to use null values as arrays

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

Change 537139 merged by jenkins-bot:
[avro-php@master] protocol: Fix compatibility with PHP 7.4

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

Change 537188 merged by jenkins-bot:
[mediawiki/core@master] SectionProfiler: Do not attempt to use null values as arrays

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

Reedy triaged this task as Low priority.Sep 16 2019, 11:42 PM
Reedy added a project: MediaWiki-General.

Change 537181 merged by jenkins-bot:
[mediawiki/core@master] services: Do not use deprecated ReflectionType::__toString() in tests

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

Change 537685 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/core@master] Update remex-html library to 2.1.0

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

Change 537779 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/vendor@master] Update remex-html to 2.1.0

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

Change 537779 merged by jenkins-bot:
[mediawiki/vendor@master] Update remex-html to 2.1.0

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

Change 537685 merged by jenkins-bot:
[mediawiki/core@master] Update remex-html library to 2.1.0

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

RazeSoldier updated the task description. (Show Details)Sep 20 2019, 5:08 PM

I think we can announce support for PHP 7.4 in MediaWiki 1.35 release.

Reedy updated the task description. (Show Details)Sep 20 2019, 5:50 PM

Tagging MW-1.35-release, make this ticket as a MW 1.35 release blocker.

There are enough reasons to think that the next version (1.35) supports PHP 7.4 is a good choice.

MaxSem changed the status of subtask T192167: Upgrade PHPUnit from 4/6 to 8 from Stalled to Open.Oct 4 2019, 6:16 AM

Change 541657 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/core@master] Travis: test on PHP 7.4, allowing failures

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

Reedy updated the task description. (Show Details)Oct 8 2019, 11:52 PM

Change 541657 merged by jenkins-bot:
[mediawiki/core@master] Travis: test on PHP 7.4, allowing failures

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

Jdforrester-WMF changed the status of subtask T236132: Provide CI testing for PHP 7.4 from Open to Stalled.Wed, Oct 30, 3:33 PM