Skip to content

Commit

Permalink
WIP for 3.0 (#16)
Browse files Browse the repository at this point in the history
* Prepare for 3.0

* Corrected ordering of the paginated responses for the Illuminate message repository.

* Allow all major versions

* Ensure pagination is correctly sorted.

* Ensure the correct exception is thrown when pagination fails.

* Update signature to latest v3 design

* Upgraded to latest pagination signature.

* Use ID seeking, instead of offsets.

* prevent second method call

* typo

* Use stable version of 3.0
  • Loading branch information
frankdejonge authored Aug 28, 2022
1 parent 9fa35d5 commit 9548d68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions IlluminateTransactionalMessageRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use EventSauce\EventSourcing\AggregateRootId;
use EventSauce\EventSourcing\Message;
use EventSauce\EventSourcing\MessageRepository;
use EventSauce\EventSourcing\PaginationCursor;
use EventSauce\EventSourcing\UnableToPersistMessages;
use EventSauce\MessageOutbox\OutboxRepository;
use Generator;
Expand Down Expand Up @@ -47,4 +48,9 @@ public function retrieveAllAfterVersion(AggregateRootId $id, int $aggregateRootV
{
return $this->messageRepository->retrieveAllAfterVersion($id, $aggregateRootVersion);
}

public function paginate(PaginationCursor $cursor): Generator
{
return $this->messageRepository->paginate($cursor);
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
],
"require": {
"eventsauce/eventsauce": "^1.0||^2.0",
"eventsauce/eventsauce": "^1.0||^2.0||^3.0",
"eventsauce/message-outbox": "^0.1||^0.2||^0.3",
"illuminate/database": "^8.35||^9.0.0"
},
Expand Down

0 comments on commit 9548d68

Please sign in to comment.