wwwision/subscription-engine-neos-adapter

neos/eventstore adapter for wwwision/subscription-engine

Maintainers

👁 bwaidelich

Package info

github.com/bwaidelich/subscription-engine-neos-adapter

Type:package

pkg:composer/wwwision/subscription-engine-neos-adapter

Fund package maintenance!

bwaidelich

Paypal

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2025-06-17 17:10 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 7040f849a7830112ede09f0fab0369be4bb5e871

  • Bastian Waidelich <b.waidelich.woop@wwwision.de>

This package is auto-updated.

Last update: 2026-05-30 09:34:20 UTC


README

neos/eventstore adapter for wwwision/subscription-engine

Usage

$eventStore = new DoctrineEventStore($dbalConnection, eventTableName: 'events');

$subscriptionEngine = new SubscriptionEngine(
 eventStoreAdapter: new NeosEventStoreAdapter($eventStore),
 subscriptionStore: new DoctrineSubscriptionStore($dbalConnection, tableName: 'subscriptions'),
 subscribers: Subscribers::fromArray([
 Subscriber::create(
 id: 'some-projection',
 handler: fn (EventEnvelope $eventEnvelope) => print($eventEnvelope->event->type->value),
 reset: fn () => print('resetting projection for replay'),
 ),
 Subscriber::create(
 id: 'some-process',
 handler: fn (EventEnvelope $eventEnvelope) => print('invoking process...'),
 runMode: RunMode::FROM_NOW,
 setup: fn () => print('setting up process...'),
 ),
 ])
);

Contribution

Contributions in the form of issues or pull requests are highly appreciated

License

See LICENSE