From 64322c8b660797563910c7021b50b3a3b43caa2e Mon Sep 17 00:00:00 2001 From: bwaidelich Date: Fri, 11 Aug 2023 10:55:31 +0200 Subject: [PATCH] Fix support for `CatchUpOptions::maximumSequenceNumber` --- Neos.ContentRepository.Core/Classes/ContentRepository.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Neos.ContentRepository.Core/Classes/ContentRepository.php b/Neos.ContentRepository.Core/Classes/ContentRepository.php index 311be1255a4..91e63ac6970 100644 --- a/Neos.ContentRepository.Core/Classes/ContentRepository.php +++ b/Neos.ContentRepository.Core/Classes/ContentRepository.php @@ -166,6 +166,9 @@ public function catchUpProjection(string $projectionClassName, CatchUpOptions $o // TODO allow custom stream name per projection $streamName = VirtualStreamName::all(); $eventStream = $this->eventStore->load($streamName); + if ($options->maximumSequenceNumber !== null) { + $eventStream = $eventStream->withMaximumSequenceNumber($options->maximumSequenceNumber); + } $eventApplier = function (EventEnvelope $eventEnvelope) use ($projection, $catchUpHook) { $event = $this->eventNormalizer->denormalize($eventEnvelope->event);