From e78ec07e0d0f93bb75b0777702b342943eacdf56 Mon Sep 17 00:00:00 2001 From: David Badura Date: Mon, 20 Dec 2021 18:01:49 +0100 Subject: [PATCH] add argument alias for repositories --- src/DependencyInjection/PatchlevelEventSourcingExtension.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/DependencyInjection/PatchlevelEventSourcingExtension.php b/src/DependencyInjection/PatchlevelEventSourcingExtension.php index b666bd62..b5aecf4c 100644 --- a/src/DependencyInjection/PatchlevelEventSourcingExtension.php +++ b/src/DependencyInjection/PatchlevelEventSourcingExtension.php @@ -35,6 +35,7 @@ use Patchlevel\EventSourcing\Projection\ProjectionListener; use Patchlevel\EventSourcing\Projection\ProjectionRepository; use Patchlevel\EventSourcing\Repository\DefaultRepository; +use Patchlevel\EventSourcing\Repository\Repository; use Patchlevel\EventSourcing\Repository\SnapshotRepository; use Patchlevel\EventSourcing\Schema\DoctrineSchemaManager; use Patchlevel\EventSourcing\Schema\MigrationSchemaProvider; @@ -270,6 +271,8 @@ private function configureAggregates(array $config, ContainerBuilder $container) ]) ->setPublic(true); } + + $container->registerAliasForArgument($id, Repository::class, $aggregateName . 'Repository'); } }