As part of the refactoring described in ADR 22 EntityId needs to become an interface (so PropertyId can be an interface implemented by NumericPropertyId and FederatedPropertyId).
Some of the groundwork has been done - SerializableEntityId has been introduced (see https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/723182).
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Make EntityId an interface | mediawiki/extensions/Wikibase | master | +24 -200 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | None | T288234 Create a Property ID interface and use it | |||
| Resolved | • Tonina_Zhelyazkova_WMDE | T289125 Make PropertyId into an interface and introduce NumericPropertyId | |||
| Resolved | Jakob_WMDE | T291810 Change the abstract class EntityId into an interface |
Event Timeline
Change 723994 had a related patch set uploaded (by Jakob; author: Jakob):
[mediawiki/extensions/Wikibase@master] Make EntityId an interface
Change 723994 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Make EntityId an interface
When trying to upgrade my Mediawiki instance from v1_36 to v1_38, I am getting an error from SerializableEntityId:
Fatal error: Wikibase\DataModel\Entity\SerializableEntityId cannot implement Wikibase\DataModel\Entity\EntityId - it is not an interface in /var/www/vhosts/mediawiki_1_38/w/extensions/Wikibase/lib/packages/wikibase/data-model/src/Entity/SerializableEntityId.php on line 11
I have tried running composer update --no-dev multiple times, I have made sure that all extensions are included in the root composer.local.json, I have tried running git submodule update --init --recursive under Wikibase, but nothing seems to be helping. Arghhh. Any suggestions?
@Lwangaman It sounds like there are two versions of the DataModel code loaded on your wiki. I believe this can happen if you ran composer install or composer update in an extension folder at some point prior to migrating.
My suggestion would be to find the other EntityId.php file(s) in which EntityId is still a class. You can try running something like find . -name EntityId.php in your mediawiki directory. It *should* only list ./extensions/Wikibase/lib/packages/wikibase/data-model/src/Entity/EntityId.php, but my guess is that you'll have at least one more in a vendor/ folder somewhere. Since you're using composer.local.json (as you should), you can safely delete any other extensions/*/vendor/ directory you find.
ok thank you for the heads up, there was in fact a vendor folder under the WikibaseImport extension. After removing that, I no longer get the above Fatal error.