Page MenuHomePhabricator

EntityDocument extending ClearableEntity might cause a rough migration
Closed, ResolvedPublic

Description

When running unit tests on recent WikibaseLexeme, I get a fatal interpreter error. The UI also whitescreens.

Using PHP 7.1.16
PHP Fatal error:  Class Wikibase\Lexeme\DataModel\Form cannot implement previously implemented interface Wikibase\DataModel\Entity\ClearableEntity in /srv/mediawiki-extensions/WikibaseLexeme/src/DataModel/Form.php on line 23

This problem can be resolved with a patch, https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/WikibaseLexeme/+/464083/

However, strange problems show up in the docker CI output, suggesting that the wikibase/data-model library is somehow out of sync. CI reports that version 8.0.0 of the library is installed, which is what I have locally, but CI tests fail with an param-illegal error. Tests pass locally. This error can be emitted by various validations in Wikibase, but I'm randomly suspecting EditEntity::dieIfNotClearable, which looks like it would fail if the ClearableEntity interface were not inherited correctly.

Regardless of the specific cause, I would worry that the production migration might be problematic, it seems that you'll experience a crash whether deploying the library upgrade first, or the patch first.

Details

Event Timeline

Change 464083 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/WikibaseLexeme@master] Remove redundant interface

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

Addshore claimed this task.
Addshore subscribed.

We killed this annoyance with version 9.0.0 of datamodel

https://github.com/wmde/WikibaseDataModel/blob/master/RELEASE-NOTES.md

This version is now used everywhere as part of T206325

Change 464083 abandoned by Addshore:
Remove redundant interface

Reason:
no longer needed, See https://phabricator.wikimedia.org/T206136

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