Page MenuHomePhabricator

Replace LegacyIdInterpreter with EntityIdComposer
Open, LowPublic

Description

LegacyIdInterpreter allows ItemId and PropertyId to be constructed from numeric IDs. We however need support for custom entities with numeric IDs too, at least as long as we do not have a replacement for the terms table (see T86530). EntityIdComposer provides an extensible mechanism for instantiating IDs for arbitrary entity types from numeric IDs. It should replace LegacyIdInterpreter everywhere.

This may require EntityIdComposer to be moved to WikiBaseServices.

LegacyIdInterpreter should be deleted when this is done.

Event Timeline

daniel created this task.Nov 24 2016, 6:15 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 24 2016, 6:15 PM
daniel updated the task description. (Show Details)

Not sure this is still relevant. LegacyIdInterpreter seems to only be used in backwards-compat code now, which is restricted to Items and Properties. It's used in:

  • EntityIdValue, for the legacy serialization format (which only exists for items and properties)
  • LegacyEntityIdDeserializer, which only supports items and properties
  • EntityContentDataCodec, for decoding the old style representation of entity IDs, which was only ever used for items and properties.

So these all seem fine. Perhaps LegacyIdInterpreter could be re-implemented based on EntityIdComposer, or EntityIdComposer could have a static getLegacyIdComposer method, that would return a EntityIdComposer instance for just items and properties.

WMDE-leszek triaged this task as Low priority.Mar 15 2017, 9:09 AM