Page MenuHomePhabricator

Introduce ActorStore service
Closed, ResolvedPublic1 Estimated Story Points


To allow more code to operate on lightweight, serializable UserIdentityValue objects rather than full User objects, introduce an ActorStore service for acquiring UserIdentity instances. ActorStore would implement a more narrow ActorLookup interface, and would cover logic currently located in User and in ActorMigration.

Interface draft:

interface ActorLookup {
  function getActorById( $actorId ) : UserIdentity;
  function getUserById( $userId ) : UserIdentity;
  function getUserByName( $name ) : ?UserIdentity;

class ActorStore implements ActorLookup {
  function acquireActorByName( $name ) : UserIdentity;
  function getUserQueryBuilder( $name ) : SelectQueryBuilder;