Page MenuHomePhabricator

[Task] Allow constructing all kinds of entity IDs from numbers
Closed, ResolvedPublic

Description

https://github.com/wmde/WikibaseDataModel/pull/670 proposes an Int32EntityId interface as a clean way to deconstruct an EntityId into a number. However, this interface is optional and not blocking us since we can do the same via method_exists( …, 'getNumericId' ).

What's blocking us now (see https://gerrit.wikimedia.org/r/#/c/290461/1/lib/includes/Store/Sql/SqlEntityInfoBuilder.php) is the fact that we do not have a service to reconstruct an EntityId from an entity type (or a prefix) and a number. Currently we do this with LegacyIdInterpreter::newIdFromTypeAndNumber (used 8 times in production), but this static method can't learn new entity types.

Patches for review:

Related Objects

StatusAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenNone
ResolvedAbit
OpenNone
DuplicateNone
OpenNone
OpenNone
OpenNone
DuplicateNone
InvalidLydia_Pintscher
OpenNone
OpenNone
StalledNone
OpenNone
OpenNone
Resolvedthiemowmde
OpenNone
Resolvedthiemowmde

Event Timeline

Restricted Application removed a project: Patch-For-Review. · View Herald TranscriptMay 26 2016, 1:21 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript

Change 290930 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Introduce FragmentedEntityIdBuilder and "fragmented-entity-id-builder"

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

Addshore moved this task from incoming to in progress on the Wikidata board.May 26 2016, 3:07 PM

Change 290930 merged by jenkins-bot:
Introduce EntityIdComposer and "entity-id-composer"

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

Change 292141 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Make all term index based services support new entity types

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

Change 292144 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Merge "Split entity-id-builder-pair config into pattern and builder"

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

Change 292145 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Add missing message and composer configuration

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

Change 292144 abandoned by Thiemo Mättig (WMDE):
Merge "Split entity-id-builder-pair config into pattern and builder"

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

Change 292145 abandoned by Thiemo Mättig (WMDE):
Add missing message and composer configuration

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

Change 292141 merged by jenkins-bot:
Make all term index based services support new entity types

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

Jonas closed this task as Resolved.Jun 13 2016, 1:57 PM
Jonas moved this task from Review to Done on the Wikidata-Sprint-2016-05-24 board.

Change 295224 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Make TermIndexEntry::getNumericId private

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

Change 295224 merged by jenkins-bot:
Make TermIndexEntry::getNumericId private

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