Skip to content

Commit

Permalink
full list of changes below:
Browse files Browse the repository at this point in the history
- fixed registering listeners within container
- configured subscription repository using projection
  • Loading branch information
alanbem committed Jun 26, 2019
1 parent 0ff22c7 commit 2a394f3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/DependencyInjection/StreakExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function load(array $configs, ContainerBuilder $container)
$loader->load('services.yaml');
$loader->load('command_handlers.yaml');
$loader->load('query_handlers.yaml');
$loader->load('projectors.yaml');
}

public function getNamespace()
Expand Down
8 changes: 8 additions & 0 deletions src/Resources/config/projectors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
streak.listener.subscriptions_projector.factory:
class: Streak\Application\Listener\Subscriptions\Projector\Factory
arguments:
- '@streak.dbal.postgres.event_store.connection'
- '@streak.clock'
tags:
- 'streak.listener_factory'
9 changes: 8 additions & 1 deletion src/Resources/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ services:
- '@streak.event_store'
- '@streak.unit_of_work'

streak.subscription_repository: '@streak.event_sourced.subscription_repository'
streak.subscriptions_projection.subscription_repository:
class: Streak\Infrastructure\Event\Subscription\ProjectionRepository
arguments:
- '@streak.event_sourced.subscription_repository'
- '@streak.query_bus'

streak.subscription_repository: '@streak.subscriptions_projection.subscription_repository'

streak.null.event_bus:
class: Streak\Infrastructure\EventBus\NullEventBus
Expand Down Expand Up @@ -237,6 +243,7 @@ services:
Streak\Domain\EventBus: '@streak.event_bus'
Streak\Application\CommandHandler: '@streak.command_handler'
Streak\Application\CommandBus: '@streak.command_bus'
Streak\Application\QueryBus: '@streak.query_bus'
Streak\Domain\EventStore: '@streak.event_store'
Streak\Domain\AggregateRoot\Factory: '@streak.aggregate_factory'
Streak\Infrastructure\AggregateRoot\Snapshotter: '@streak.snapshotter'
Expand Down

0 comments on commit 2a394f3

Please sign in to comment.