Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Store/Dbal/ProvideDbalConnection.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

namespace Patchlevel\EventSourcing\Store\Dbal;

use Doctrine\DBAL\Connection;

interface ProvideDbalConnection
{
public function connection(): Connection;
}
3 changes: 2 additions & 1 deletion src/Store/StreamDoctrineDbalStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
use Patchlevel\EventSourcing\Store\Criteria\StreamCriterion;
use Patchlevel\EventSourcing\Store\Criteria\ToIndexCriterion;
use Patchlevel\EventSourcing\Store\Criteria\ToPlayheadCriterion;
use Patchlevel\EventSourcing\Store\Dbal\ProvideDbalConnection;
use Patchlevel\EventSourcing\Store\Header\EventIdHeader;
use Patchlevel\EventSourcing\Store\Header\IndexHeader;
use Patchlevel\EventSourcing\Store\Header\PlayheadHeader;
Expand Down Expand Up @@ -66,7 +67,7 @@

use const PHP_VERSION_ID;

final class StreamDoctrineDbalStore implements Store, SubscriptionStore, DoctrineSchemaConfigurator
final class StreamDoctrineDbalStore implements Store, SubscriptionStore, DoctrineSchemaConfigurator, ProvideDbalConnection
{
/**
* PostgreSQL has a limit of 65535 parameters in a single query.
Expand Down
3 changes: 2 additions & 1 deletion src/Store/TaggableDoctrineDbalStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
use Patchlevel\EventSourcing\Store\Criteria\TagCriterion;
use Patchlevel\EventSourcing\Store\Criteria\ToIndexCriterion;
use Patchlevel\EventSourcing\Store\Criteria\ToPlayheadCriterion;
use Patchlevel\EventSourcing\Store\Dbal\ProvideDbalConnection;
use Patchlevel\EventSourcing\Store\Header\EventIdHeader;
use Patchlevel\EventSourcing\Store\Header\IndexHeader;
use Patchlevel\EventSourcing\Store\Header\PlayheadHeader;
Expand Down Expand Up @@ -76,7 +77,7 @@
use const PHP_VERSION_ID;

/** @experimental */
final class TaggableDoctrineDbalStore implements Store, AppendStore, SubscriptionStore, DoctrineSchemaConfigurator
final class TaggableDoctrineDbalStore implements Store, AppendStore, SubscriptionStore, DoctrineSchemaConfigurator, ProvideDbalConnection
{
/**
* PostgreSQL has a limit of 65535 parameters in a single query.
Expand Down
Loading