|
10 | 10 | use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootMetadataFactory; |
11 | 11 | use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootRegistry; |
12 | 12 | use Patchlevel\EventSourcing\Snapshot\SnapshotStore; |
13 | | -use Patchlevel\EventSourcing\Store\Criteria; |
| 13 | +use Patchlevel\EventSourcing\Store\Criteria\AggregateIdCriterion; |
| 14 | +use Patchlevel\EventSourcing\Store\Criteria\AggregateNameCriterion; |
| 15 | +use Patchlevel\EventSourcing\Store\Criteria\Criteria; |
14 | 16 | use Patchlevel\EventSourcing\Store\Store; |
15 | 17 | use Patchlevel\EventSourcing\Store\Stream; |
16 | 18 | use Patchlevel\Hydrator\Hydrator; |
@@ -82,8 +84,8 @@ public function showAction(Request $request, string $aggregateName, string $aggr |
82 | 84 | $aggregate = $this->aggregate($aggregateName, $aggregateId, $until); |
83 | 85 |
|
84 | 86 | $criteria = new Criteria( |
85 | | - aggregateName: $aggregateName, |
86 | | - aggregateId: $aggregateId, |
| 87 | + new AggregateNameCriterion($aggregateName), |
| 88 | + new AggregateIdCriterion($aggregateId), |
87 | 89 | ); |
88 | 90 |
|
89 | 91 | $messages = $this->store->load( |
@@ -138,8 +140,8 @@ public function showAction(Request $request, string $aggregateName, string $aggr |
138 | 140 | private function aggregate(string $aggregateName, string $aggregateId, int|null $until = null): AggregateRoot |
139 | 141 | { |
140 | 142 | $criteria = new Criteria( |
141 | | - aggregateName: $aggregateName, |
142 | | - aggregateId: $aggregateId, |
| 143 | + new AggregateNameCriterion($aggregateName), |
| 144 | + new AggregateIdCriterion($aggregateId), |
143 | 145 | ); |
144 | 146 |
|
145 | 147 | $stream = null; |
|
0 commit comments