Page MenuHomePhabricator

CI fails for WikibaseLexemeCirrusSearch unit tests due to missing class exported by WikibaseLexeme
Closed, ResolvedPublic

Description

WikibaseLexemeCirrusSearch quibble-vendor-mysql-hhvm-docker started to fail for no particular reason.
The failure is :

Fatal error: Class undefined: Wikibase\Lexeme\Tests\DataModel\NewForm in /workspace/src/extensions/WikibaseLexemeCirrusSearch/tests/phpunit/LexemeFieldTest.php on line 29

This class should be exported by WikibaseLexeme composer.json autoload:

"autoload": {
     "psr-4": {
        "Wikibase\\Lexeme\\": "src/",
        "Wikibase\\Lexeme\\Tests\\": "tests/phpunit/composer/"
     }
 },

but it was moved to tests/phpunit/unit

Event Timeline

Change 526127 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/WikibaseLexeme@master] Move NewForm.php back to tests/phpunit/composer

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

dcausse triaged this task as Medium priority.
dcausse updated the task description. (Show Details)

Why not fixing WikibaseLexemeCirrusSearch instead of reverting the change? (We searched in codesearch, is WikibaseLexemeCirrusSearch missing there?)

Change 526145 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Fix namespace for NewForm and NewLexeme

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

Why not fixing WikibaseLexemeCirrusSearch instead of reverting the change? (We searched in codesearch, is WikibaseLexemeCirrusSearch missing there?)

Because I assumed that the Unit namespace was not exported making this classes invisible to WikibaseLexemeCirrusSearch, I've sent a patch there to use the new namespace.

Change 526127 abandoned by DCausse:
Move NewForm.php back to tests/phpunit/composer

Reason:
not needed, simply using the new namespace in WikibaseLexemeCirrusSearch worked

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

Thanks, this worked!
As for codesearch and WikibaseLexemeCirrusSearch I double checked and this project is available.

Change 526145 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Fix namespace for NewForm and NewLexeme

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