wwwision / subscription-engine-neos-adapter
neos/eventstore adapter for wwwision/subscription-engine
Fund package maintenance!
bwaidelich
Paypal
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:package
Requires
- php: >=8.3
- neos/eventstore: ^1
- wwwision/subscription-engine: ^1
Requires (Dev)
- phpstan/phpstan: ^2
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^4.0.x-dev
This package is auto-updated.
Last update: 2025-06-17 17:10:40 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