Page MenuHomePhabricator

Wikibase CI fails with “ReflectionException: Property handlers does not exist” in LexemeDiffVisualizerIntegrationTest
Closed, ResolvedPublic

Description

Example build: quibble-vendor-mysql-php72-noselenium-docker #7789, for I2e00d1f515. Also affected PS2 of the same change – so far this seems to be a consistent error that happens on every build.

12:42:30 There were 9 errors:
12:42:30 
12:42:30 1) Wikibase\Lexeme\Tests\MediaWiki\Diff\LexemeDiffVisualizerIntegrationTest::testAddedStatementsWithLexemesAsTargetDisplayLemma
12:42:30 === Logs generated by test case
12:42:30 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
12:42:30 [localisation] [debug] LocalisationCache using store LCStoreNull []
12:42:30 [localisation] [debug] LocalisationCache using store LCStoreNull []
12:42:30 [localisation] [debug] LocalisationCache using store LCStoreNull []
12:42:30 [MessageCache] [debug] MessageCache using store {class} {"class":"HashBagOStuff"}
12:42:30 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
12:42:30 [Wikibase] [debug] {method}: setting {settingName} was given as a closure, resolve it to {logValue} {"method":"Wikibase\\Lib\\SettingsArray::getSetting","settingName":"conceptBaseUri","logValue":"'http:\/\/127.0.0.1:9412\/entity\/'"}
12:42:30 ===
12:42:30 ReflectionException: Property handlers does not exist
12:42:30 
12:42:30 /workspace/src/extensions/WikibaseLexeme/tests/phpunit/mediawiki/Diff/LexemeDiffVisualizerIntegrationTest.php:455
12:42:30 /workspace/src/extensions/WikibaseLexeme/tests/phpunit/mediawiki/Diff/LexemeDiffVisualizerIntegrationTest.php:52
12:42:30 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:424
12:42:30 /workspace/src/maintenance/doMaintenance.php:105

(The other 8 test failures look pretty similar.)

Event Timeline

git bisect blames MediaWiki core change I432861d899, Hook Container (T240307).

Ah, because that test was directly accessing a private property of the Hook class ^^ fair enough, that’s on us.

private function getHookHandlersProperty() {
	$handlers = ( new \ReflectionClass( \Hooks::class ) )->getProperty( 'handlers' );
	$handlers->setAccessible( true );

	return $handlers;
}

So @Lucas_Werkmeister_WMDE started working on this already while I was still weighing options (disabling entirely vs fixing)...

Change 589580 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] Use setTemporaryHook() in test

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

Change 589580 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Use setTemporaryHook() in test

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