Skip to content

Commit

Permalink
BUGFIX: Ensure that replay does not reset new or detached projections
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Dec 13, 2024
1 parent 24890b9 commit ca79907
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ public function reset(SubscriptionEngineCriteria|null $criteria = null): Result
}
$errors = [];
foreach ($subscriptions as $subscription) {
if ($subscription->status === SubscriptionStatus::NEW
|| !$this->subscribers->contain($subscription->id)) {
// todo test this case! And mark projections as detached?
continue;
}
$error = $this->resetSubscription($subscription);
if ($error !== null) {
$errors[] = $error;
Expand Down

0 comments on commit ca79907

Please sign in to comment.