Skip to content

Commit 4d6174c

Browse files
committed
Implement Storage with Transaction generic
1 parent 2a7139f commit 4d6174c

File tree

3 files changed

+81
-77
lines changed

3 files changed

+81
-77
lines changed

composer.lock

Lines changed: 78 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/PostgresStorage.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Thesis\MessageBus\Persistence\Postgres;
66

77
use Amp\Postgres\PostgresLink;
8+
use Amp\Postgres\PostgresTransaction as AmphpPostgresTransaction;
89
use Thesis\Message\Command;
910
use Thesis\Message\Event;
1011
use Thesis\MessageBus\Envelope;
@@ -14,6 +15,7 @@
1415

1516
/**
1617
* @api
18+
* @implements Storage<AmphpPostgresTransaction>
1719
*/
1820
final readonly class PostgresStorage implements Storage
1921
{

src/PostgresTransaction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/**
1616
* @internal
1717
* @psalm-internal Thesis\MessageBus\Persistence\Postgres
18+
* @implements Transaction<AmphpPostgresTransaction>
1819
*/
1920
final readonly class PostgresTransaction implements Transaction
2021
{

0 commit comments

Comments
 (0)