Add event emitter, GIN index for tags and DCB with any append store - #342
Merged
Merged
Conversation
The event emitter is opt-in via subscription.event_emitter, because removing a subscription also removes its subscription stream from the event store. With a taggable store the PostgreSQLPlatformMiddleware is registered on the event store connection, so the GIN index for tags gets created. DCB now uses the configured store, so the in memory store can be used in tests as well.
DanielBadura
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This wires up a few event-sourcing 4.0 features that the bundle didn't support yet.
The event emitter can be enabled with
subscription.event_emitter. It registers theEventEmitterResolverand theRemoveSubscriptionStreamListeneron the engine's event dispatcher. It's opt-in because removing a subscription also deletes itssubscription_<id>stream from the event store, and it can't be combined with a read only store.With a
dbal_taggablestore thePostgreSQLPlatformMiddlewareis now registered on the event store connection, so the GIN index for the tags gets created on PostgreSQL. For aurlconnection this happens in theDbalConnectionFactory, for a doctrine connection likedoctrine.dbal.eventstore_connectionvia thedoctrine.middlewaretag. Any other connection service needs the middleware registered manually, which is mentioned in the docs.DCB now uses the configured store instead of the
TaggableDoctrineDbalStoredirectly. Since theInMemoryStoreimplementsAppendStoreas well, it can now be used in tests, and custom append stores work too. Onlydbal_streamis rejected.The lock file is updated to the latest event-sourcing 4.0.x, which contains the GIN index.