Page MenuHomePhabricator

Replace LegacyIdInterpreter with EntityIdComposer
Closed, DeclinedPublic


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

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.

Addshore added a subscriber: Addshore.

Sounds like there is nothing to really look at here now per daniels comment.