Page MenuHomePhabricator

Move FundraisingStore code into bounded contexts
Closed, ResolvedPublic


  • Move the Doctrine entities from FundraisingStore into the respective bounded contexts (Choosing a proper namespace, e.g. DataAccess\DoctrineEntities). Change the entity namespace in the bounded contexts from WMDE/Fundraising\Entities to the Domain-specific namespace, e.g. WMDE\Fundraising\Donation\DataAccess\DoctrineEntities.
  • Each bounded context should have a factory class that can
    • create an entity manager (for the unit tests of the bounded context)
    • Return information about its mapping driver class (e.g. Doctrine\ORM\Mapping\Driver\AnnotationDriver or Doctrine\ORM\Mapping\Driver\XmlDriver) with a getDriverName and have a addPaths method that adds the entity-specific paths to the drivers.
    • return
  • Add EntityManagerFactory to FundraisingFrontend:
    • initialize the Annotation and XML drivers and then call the addPaths method of the bounded contexts to add paths
    • Collect events from bounded contexts
  • Remove FundraisingStore from the Fundraising Operation Center:
      • Change the namespace references, similar to the changes in the previous step.
    • Copy EntityManagerFactory from FundraisingFrontend and add Backend-Specific entity paths (Users, Impressions) to the annotation driver.
  • Remove the FundraisingStore dependency from all composer.json files