Skip to content

Commit

Permalink
rename message loader classes
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura committed Dec 5, 2024
1 parent d28386d commit f3b413f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Subscription/Engine/DefaultSubscriptionEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(
if ($messageStore instanceof MessageLoader) {
$this->messageLoader = $messageStore;
} else {
$this->messageLoader = new DefaultMessageLoader($messageStore);
$this->messageLoader = new StoreMessageLoader($messageStore);
}

$this->subscriptionManager = new SubscriptionManager($subscriptionStore);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

use function array_keys;

final class EventFilteredMessageLoader implements MessageLoader
final class EventFilteredStoreMessageLoader implements MessageLoader
{
public function __construct(
private readonly Store $store,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Patchlevel\EventSourcing\Store\Stream;
use Patchlevel\EventSourcing\Subscription\Subscription;

final class DefaultMessageLoader implements MessageLoader
final class StoreMessageLoader implements MessageLoader
{
public function __construct(
private readonly Store $store,
Expand Down
4 changes: 2 additions & 2 deletions tests/Benchmark/SubscriptionEngineBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Patchlevel\EventSourcing\Store\DoctrineDbalStore;
use Patchlevel\EventSourcing\Store\Store;
use Patchlevel\EventSourcing\Subscription\Engine\DefaultSubscriptionEngine;
use Patchlevel\EventSourcing\Subscription\Engine\EventFilteredMessageLoader;
use Patchlevel\EventSourcing\Subscription\Engine\EventFilteredStoreMessageLoader;
use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngine;
use Patchlevel\EventSourcing\Subscription\Store\DoctrineSubscriptionStore;
use Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessorRepository;
Expand Down Expand Up @@ -79,7 +79,7 @@ public function setUp(): void
);

$this->subscriptionEngine = new DefaultSubscriptionEngine(
new EventFilteredMessageLoader(
new EventFilteredStoreMessageLoader(
$this->store,
new AttributeEventMetadataFactory(),
$subscriberAccessorRepository,
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/Subscription/SubscriptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use Patchlevel\EventSourcing\Store\StreamDoctrineDbalStore;
use Patchlevel\EventSourcing\Subscription\Engine\CatchUpSubscriptionEngine;
use Patchlevel\EventSourcing\Subscription\Engine\DefaultSubscriptionEngine;
use Patchlevel\EventSourcing\Subscription\Engine\EventFilteredMessageLoader;
use Patchlevel\EventSourcing\Subscription\Engine\EventFilteredStoreMessageLoader;
use Patchlevel\EventSourcing\Subscription\Engine\SubscriptionEngineCriteria;
use Patchlevel\EventSourcing\Subscription\RetryStrategy\ClockBasedRetryStrategy;
use Patchlevel\EventSourcing\Subscription\RunMode;
Expand Down Expand Up @@ -97,7 +97,7 @@ public function testHappyPath(): void
$subscriberRepository = new MetadataSubscriberAccessorRepository([new ProfileProjection($this->projectionConnection)]);

$engine = new DefaultSubscriptionEngine(
new EventFilteredMessageLoader($store, new AttributeEventMetadataFactory(), $subscriberRepository),
new EventFilteredStoreMessageLoader($store, new AttributeEventMetadataFactory(), $subscriberRepository),
$subscriptionStore,
$subscriberRepository,
);
Expand Down

0 comments on commit f3b413f

Please sign in to comment.