event-store: Problem with ActionEventEmitterEventStore and Projections

Currently it delegates the projection creation to the used event store implementation. This is a problem, as the wrapped event store is then not used in the projection itself, and you cannot attach listeners to it during projection’s emit and linkTo.

$eventStore->createProjection($eventStore) would solve the issue (adding event store as optional parameter, which will only be set by action event emitter event store) - but this looks weird and might lead to some people injecting a complete different event store instance, which would be cleary wrong.

Ideas?

@codeliner @oqq @bweston92

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (24 by maintainers)

Commits related to this issue

Most upvoted comments

@sandrokeil the reason is, that you should be only able to configure a projection / query with the correct event store instance. while you can still instantiate the projection / query manually, you can still run in this issue, but it’s unlikely someone does that. a false configuration can lead to injecting the wrong event store instance to the projection / query and make it useless.