Page MenuHomePhabricator

[Task] Create an EntityDifferFactory
Closed, InvalidPublic

Description

EntityDifferFactory provides access to the correct EntityDiffer for a given entity type.
Currently, the differ is baked into Entity::getDiff. Since it has been deprecated for a long time, we should drop Entity::getDiff completely, and move its functionality into ItemContent::getDiff and friends.

Use case: EntityDifferFactory is needed by the proposed EntityDiff API module.

Event Timeline

daniel raised the priority of this task from to Needs Triage.
daniel updated the task description. (Show Details)
daniel added a project: Wikidata.
daniel updated the task description. (Show Details)
daniel set Security to None.
daniel added subscribers: Halfak, Ladsgroup, Aklapper, daniel.
daniel removed a subscriber: Halfak.
daniel triaged this task as Medium priority.Jul 19 2015, 10:56 PM
daniel moved this task from incoming to consider for next sprint on the Wikidata board.

I think it'd have been better if this was phrased as "create means to construct an EntityDiffer", which does not already decide on a specific approach.

As far as I can tell, there is no need for this at all. What would such a factory class do? Just have the entity differ be constructed in the appropriate DI system (ie the WikibaseRepo class). Furthermore, even though Entity::getDiff was deprecated, it did have a replacement. Which is what you should use now, as Entity::getDiff has been removed already.

Jonas renamed this task from Create an EntityDifferFactory to [Task] Create an EntityDifferFactory.Aug 13 2015, 2:33 PM