Page MenuHomePhabricator

wikibase-client-php81 and wikibase-repo-php81 Wikibase CI jobs broken on REL1_39 with various deprecations and a fatal error
Closed, ResolvedPublic

Description

On this REL1_39 backport, CI is failing (client console, repo console) with lots of deprecation warnings, and in the repo case, one fatal error:

PHP Fatal error:  During inheritance of Iterator: Uncaught Return type of Wikibase\Repo\IO\LineReader::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

/workspace/src/extensions/Wikibase/repo/includes/IO/LineReader.php:101
/workspace/src/extensions/Wikibase/repo/includes/IO/LineReader.php:16
/workspace/src/includes/AutoLoader.php:244
/workspace/src/extensions/Wikibase/repo/tests/phpunit/includes/IO/EntityIdReaderTest.php:32
/workspace/src/extensions/Wikibase/repo/tests/phpunit/includes/IO/EntityIdReaderTest.php:54
 in /workspace/src/extensions/Wikibase/repo/includes/IO/LineReader.php on line 16

Also, this branch is probably also affected by T385175.

MediaWiki 1.39 is an LTS release that’s supposed to be supported until November 2025, so it would be nice if we could fix this. That said, given how many different deprecation warnings there are, I’m not sure how easy this will be. (Some of the fixes can probably be found at T319219.)

Details

Related Changes in Gerrit:

Event Timeline

That said, given how many different deprecation warnings there are, I’m not sure how easy this will be.

This backport shows that fixing the one fatal error isn’t enough to make CI green: there’s actually a second fatal error in the repo build (probably fixed by this change), and the many deprecations in the client build are also making that one fail.

If we want to be able to backport to REL1_39 without force-merging, I think we’ll have to squash a whole bunch of fixes into one big commit. (Or run CI on PHP 7.4 again? But I doubt the integration folks will be happy about this.)

Change #1115452 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@REL1_39] Fix PHP 8.1 issues

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

Change #1115452 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@REL1_39] Fix PHP 8.1 issues

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