Page MenuHomePhabricator

Allow EntityFactory to work in Wikibase for more entity types
Closed, ResolvedPublic

Description

In Wikibase Repo, EntityFactory is constructed with a hard-coded map of entity types -> class names.

Then, EntityFactory::newEmpty calls methods on the entity that might not exist for all entity types.

Related Objects

StatusSubtypeAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenNone
OpenNone
DuplicateNone
ResolvedNone
OpenNone
OpenNone
StalledNone
ResolvedNone
ResolvedNone
DuplicateNone
InvalidNone
InvalidNone
InvalidLydia_Pintscher
Resolveddaniel
ResolvedTobi_WMDE_SW
Resolvedadrianheine
OpenNone
ResolvedAddshore
Resolvedthiemowmde
ResolvedAddshore
Resolveddaniel
Resolveddaniel

Event Timeline

Change 284070 had a related patch set uploaded (by Aude):
Adjust EntityFactory::newEmpty to work for more entity types

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

also, do we still want EntityFactory to be deprecated? It is still problematic in many ways, but we can remove some of the assumptions if having this factory is important and useful.

only thing it appears used for is wbeditentity api module for creating a ne w empty entity when given some entity type.

Change 284205 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Reduce EntityFactory implementation and usage to an absolute minimum

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

Change 284070 merged by jenkins-bot:
Adjust EntityFactory::newEmpty to work for more entity types

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

Change 284482 had a related patch set (by Daniel Kinzler) published:
Let EntityFactory take callbacks instead of class names.

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

Change 285060 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Remove unused EntityFactory code and non-informational comments

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

Change 285060 merged by jenkins-bot:
Remove unused EntityFactory code and non-informational comments

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

Change 285446 had a related patch set uploaded (by Daniel Kinzler):
Take entity instantiator callbacks from WikibaseRepo.entitytypes.php

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

Change 284482 merged by jenkins-bot:
Let EntityFactory take callbacks instead of class names.

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

Change 285446 merged by jenkins-bot:
Take entity instantiator callbacks from WikibaseRepo.entitytypes.php

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

Change 285626 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Clean-up EntityFactory implementation and documentation

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

Change 284205 abandoned by Thiemo Mättig (WMDE):
Reduce EntityFactory implementation and usage to an absolute minimum

Reason:
Iee84df3 got merged instead.

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

Change 285626 merged by jenkins-bot:
Clean-up EntityFactory implementation and documentation

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