Page MenuHomePhabricator

Make Wikibase compatible with PHP 7.4
Closed, ResolvedPublic

Description

From T243590#5962809:

00:18:23.529 There were 3 errors:
00:18:23.529 
00:18:23.529 1) Wikibase\Client\Tests\Api\ApiPropsEntityUsageTest::testEntityUsage with data set "by title" (array('query', 'entityusage', 'Vienna11|Berlin22'), array(array(array(array(array('O', 'S')))), array(array(array(array('S')), array(array('S'))))))
00:18:23.529 === Logs generated by test case
00:18:23.529 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:18:23.529 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:18:23.529 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:18:23.529 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:18:23.529 ===
00:18:23.529 Trying to access array offset on value of type null
00:18:23.529 
00:18:23.529 /workspace/src/includes/api/ApiPageSet.php:127
00:18:23.529 /workspace/src/extensions/Wikibase/client/tests/phpunit/includes/Api/ApiPropsEntityUsageTest.php:117
00:18:23.529 /workspace/src/extensions/Wikibase/client/tests/phpunit/includes/Api/ApiPropsEntityUsageTest.php:164
00:18:23.529 /workspace/src/extensions/Wikibase/client/tests/phpunit/includes/Api/ApiPropsEntityUsageTest.php:226
00:18:23.529 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:416
00:18:23.529 /workspace/src/maintenance/doMaintenance.php:99
00:18:23.529 
00:18:23.529 2) Wikibase\Client\Tests\Api\ApiPropsEntityUsageTest::testEntityUsage with data set "by entity" (array('query', 'entityusage', 'Vienna11|Berlin22', 'Q3|Q4'), array(array(array(array(array('O', 'S')))), array(array(array(array('S')), array(array('S'))))))
00:18:23.529 === Logs generated by test case
00:18:23.529 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:18:23.529 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:18:23.529 [localisation] [debug] LocalisationCache using store LCStoreNull []
00:18:23.529 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
00:18:23.529 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:18:23.529 ===
00:18:23.529 Trying to access array offset on value of type null
00:18:23.529 
00:18:23.529 /workspace/src/includes/api/ApiPageSet.php:127
00:18:23.529 /workspace/src/extensions/Wikibase/client/tests/phpunit/includes/Api/ApiPropsEntityUsageTest.php:117
00:18:23.529 /workspace/src/extensions/Wikibase/client/tests/phpunit/includes/Api/ApiPropsEntityUsageTest.php:164
00:18:23.529 /workspace/src/extensions/Wikibase/client/tests/phpunit/includes/Api/ApiPropsEntityUsageTest.php:226
00:18:23.529 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:416
00:18:23.529 /workspace/src/maintenance/doMaintenance.php:99
00:18:23.529 
00:18:23.529 3) Wikibase\Client\Tests\Changes\ChangeRunCoalescerTest::testCoalesceChanges with data set "local link breaks" (array(Wikibase\Lib\Changes\ItemChange Object (...), Wikibase\Lib\Changes\ItemChange Object (...)), array(Wikibase\Lib\Changes\ItemChange Object (...), Wikibase\Lib\Changes\ItemChange Object (...)))
00:18:23.529 === Logs generated by test case
00:18:23.529 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
00:18:23.529 ===
00:18:23.529 Wikibase\Client\Changes\ChangeRunCoalescer::coalesceRuns:array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead [Called from Wikibase\Client\Changes\ChangeRunCoalescer::coalesceRuns in /workspace/src/extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php at line 287]
00:18:23.529 
00:18:23.529 /workspace/src/includes/debug/MWDebug.php:333
00:18:23.529 /workspace/src/includes/debug/MWDebug.php:188
00:18:23.529 /workspace/src/includes/GlobalFunctions.php:1068
00:18:23.529 /workspace/src/extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php:287
00:18:23.529 /workspace/src/extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php:80
00:18:23.529 /workspace/src/extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php:386
00:18:23.529 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:416
00:18:23.529 /workspace/src/maintenance/doMaintenance.php:99

Event Timeline

Change 579528 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/Wikibase@master] Fix for PHP 7.4 compat

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

Change 579528 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix for PHP 7.4 compat

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

Now it should be compatible. Can we enable PHP74 tests as voting?

Change 579752 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/Wikibase@master] Fix for PHP 7.4 compat, take 2

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

Change 579752 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Fix for PHP 7.4 compat, take 2

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

Jdforrester-WMF subscribed.

OK, Wikibase's own test suite now passes, but I've opened T247806: Make WikibaseLexeme compatible with PHP 7.4 for WikibaseLexeme.