diff --git a/examples/demo-persistent-subscription-with-dns-cluster.php b/examples/demo-persistent-subscription-with-dns-cluster.php index 68c0f275..9b76940d 100644 --- a/examples/demo-persistent-subscription-with-dns-cluster.php +++ b/examples/demo-persistent-subscription-with-dns-cluster.php @@ -19,7 +19,6 @@ use Prooph\EventStoreClient\Exception\InvalidOperationException; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; use Prooph\EventStoreClient\Internal\PersistentSubscriptionCreateResult; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Throwable; require __DIR__ . '/../vendor/autoload.php'; diff --git a/examples/demo-persistent-subscription.php b/examples/demo-persistent-subscription.php index 3381212a..93198a26 100644 --- a/examples/demo-persistent-subscription.php +++ b/examples/demo-persistent-subscription.php @@ -19,7 +19,6 @@ use Prooph\EventStoreClient\Exception\InvalidOperationException; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; use Prooph\EventStoreClient\Internal\PersistentSubscriptionCreateResult; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Throwable; require __DIR__ . '/../vendor/autoload.php'; diff --git a/examples/demo-subscribe-to-all-from.php b/examples/demo-subscribe-to-all-from.php index f02b1d60..c9c5eb7b 100644 --- a/examples/demo-subscribe-to-all-from.php +++ b/examples/demo-subscribe-to-all-from.php @@ -17,7 +17,6 @@ use Amp\Promise; use Amp\Success; use Prooph\EventStoreClient\Internal\EventStoreCatchUpSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Throwable; require __DIR__ . '/../vendor/autoload.php'; diff --git a/examples/demo-subscribe-to-all.php b/examples/demo-subscribe-to-all.php index d6345a00..dcc95719 100644 --- a/examples/demo-subscribe-to-all.php +++ b/examples/demo-subscribe-to-all.php @@ -16,7 +16,6 @@ use Amp\Loop; use Amp\Promise; use Amp\Success; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\Internal\VolatileEventStoreSubscription; use Throwable; diff --git a/examples/demo-subscribe-to-stream-from-with-logger.php b/examples/demo-subscribe-to-stream-from-with-logger.php index 62bf5261..88a28566 100644 --- a/examples/demo-subscribe-to-stream-from-with-logger.php +++ b/examples/demo-subscribe-to-stream-from-with-logger.php @@ -17,7 +17,6 @@ use Amp\Promise; use Amp\Success; use Prooph\EventStoreClient\Internal\EventStoreCatchUpSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Throwable; require __DIR__ . '/../vendor/autoload.php'; diff --git a/examples/demo-subscribe-to-stream-from.php b/examples/demo-subscribe-to-stream-from.php index cd30980a..8c4b8a45 100644 --- a/examples/demo-subscribe-to-stream-from.php +++ b/examples/demo-subscribe-to-stream-from.php @@ -17,7 +17,6 @@ use Amp\Promise; use Amp\Success; use Prooph\EventStoreClient\Internal\EventStoreCatchUpSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Throwable; require __DIR__ . '/../vendor/autoload.php'; diff --git a/examples/demo-subscribe-to-stream.php b/examples/demo-subscribe-to-stream.php index fb770397..163510cb 100644 --- a/examples/demo-subscribe-to-stream.php +++ b/examples/demo-subscribe-to-stream.php @@ -16,7 +16,6 @@ use Amp\Loop; use Amp\Promise; use Amp\Success; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\Internal\VolatileEventStoreSubscription; use Throwable; diff --git a/src/ClientOperations/AbstractSubscriptionOperation.php b/src/ClientOperations/AbstractSubscriptionOperation.php index 88d4eab8..3baa5605 100644 --- a/src/ClientOperations/AbstractSubscriptionOperation.php +++ b/src/ClientOperations/AbstractSubscriptionOperation.php @@ -19,7 +19,6 @@ use Amp\Success; use Generator; use Prooph\EventStoreClient\EndPoint; -use Prooph\EventStoreClient\EventAppearedOnSubscription; use Prooph\EventStoreClient\EventStoreSubscription; use Prooph\EventStoreClient\Exception\AccessDeniedException; use Prooph\EventStoreClient\Exception\ConnectionClosedException; @@ -34,7 +33,6 @@ use Prooph\EventStoreClient\Messages\ClientMessages\SubscriptionDropped as SubscriptionDroppedMessage; use Prooph\EventStoreClient\Messages\ClientMessages\SubscriptionDropped_SubscriptionDropReason as SubscriptionDropReasonMessage; use Prooph\EventStoreClient\Messages\ClientMessages\UnsubscribeFromStream; -use Prooph\EventStoreClient\SubscriptionDropped; use Prooph\EventStoreClient\SubscriptionDropReason; use Prooph\EventStoreClient\SystemData\InspectionDecision; use Prooph\EventStoreClient\SystemData\InspectionResult; @@ -61,9 +59,9 @@ abstract class AbstractSubscriptionOperation implements SubscriptionOperation protected $resolveLinkTos; /** @var UserCredentials|null */ protected $userCredentials; - /** @var EventAppearedOnSubscription */ + /** @var callable */ protected $eventAppeared; - /** @var SubscriptionDropped|null */ + /** @var callable|null */ private $subscriptionDropped; /** @var bool */ private $verboseLogging; @@ -86,8 +84,8 @@ public function __construct( string $streamId, bool $resolveLinkTos, ?UserCredentials $userCredentials, - EventAppearedOnSubscription $eventAppeared, - ?SubscriptionDropped $subscriptionDropped, + callable $eventAppeared, + ?callable $subscriptionDropped, bool $verboseLogging, callable $getConnection ) { diff --git a/src/ClientOperations/ConnectToPersistentSubscriptionOperation.php b/src/ClientOperations/ConnectToPersistentSubscriptionOperation.php index af5860dc..401c7c9a 100644 --- a/src/ClientOperations/ConnectToPersistentSubscriptionOperation.php +++ b/src/ClientOperations/ConnectToPersistentSubscriptionOperation.php @@ -14,7 +14,6 @@ namespace Prooph\EventStoreClient\ClientOperations; use Amp\Deferred; -use Prooph\EventStoreClient\EventAppearedOnSubscription; use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\EventStoreSubscription; use Prooph\EventStoreClient\Exception\AccessDeniedException; @@ -60,8 +59,8 @@ public function __construct( int $bufferSize, string $streamId, ?UserCredentials $userCredentials, - EventAppearedOnSubscription $eventAppeared, - ?SubscriptionDropped $subscriptionDropped, + callable $eventAppeared, + ?callable $subscriptionDropped, bool $verboseLogging, callable $getConnection ) { diff --git a/src/EventAppearedOnCatchupSubscription.php b/src/EventAppearedOnCatchupSubscription.php index 83d08272..7dcd4a6b 100644 --- a/src/EventAppearedOnCatchupSubscription.php +++ b/src/EventAppearedOnCatchupSubscription.php @@ -15,7 +15,6 @@ use Amp\Promise; use Prooph\EventStoreClient\Internal\EventStoreCatchUpSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; interface EventAppearedOnCatchupSubscription { diff --git a/src/EventAppearedOnPersistentSubscription.php b/src/EventAppearedOnPersistentSubscription.php index a345f091..09108538 100644 --- a/src/EventAppearedOnPersistentSubscription.php +++ b/src/EventAppearedOnPersistentSubscription.php @@ -15,7 +15,6 @@ use Amp\Promise; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; interface EventAppearedOnPersistentSubscription { diff --git a/src/EventAppearedOnSubscription.php b/src/EventAppearedOnSubscription.php index a9e384c2..88bf74bb 100644 --- a/src/EventAppearedOnSubscription.php +++ b/src/EventAppearedOnSubscription.php @@ -14,7 +14,6 @@ namespace Prooph\EventStoreClient; use Amp\Promise; -use Prooph\EventStoreClient\Internal\ResolvedEvent; interface EventAppearedOnSubscription { diff --git a/src/Internal/EventStoreCatchUpSubscription.php b/src/Internal/EventStoreCatchUpSubscription.php index 124bd0cd..2104cd20 100644 --- a/src/Internal/EventStoreCatchUpSubscription.php +++ b/src/Internal/EventStoreCatchUpSubscription.php @@ -25,7 +25,6 @@ use Prooph\EventStoreClient\EventAppearedOnSubscription; use Prooph\EventStoreClient\EventStoreConnection; use Prooph\EventStoreClient\EventStoreSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent as InternalResolvedEvent; use Prooph\EventStoreClient\LiveProcessingStarted; use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\SubscriptionDropped; @@ -287,7 +286,7 @@ public function __construct(callable $callback) public function __invoke( EventStoreSubscription $subscription, - InternalResolvedEvent $resolvedEvent + ResolvedEvent $resolvedEvent ): Promise { return ($this->callback)($subscription, $resolvedEvent); } diff --git a/src/Internal/EventStorePersistentSubscription.php b/src/Internal/EventStorePersistentSubscription.php index 4632bd71..7daa52f4 100644 --- a/src/Internal/EventStorePersistentSubscription.php +++ b/src/Internal/EventStorePersistentSubscription.php @@ -21,9 +21,7 @@ use Generator; use Prooph\EventStoreClient\ConnectionSettings; use Prooph\EventStoreClient\EventAppearedOnPersistentSubscription; -use Prooph\EventStoreClient\EventAppearedOnSubscription; use Prooph\EventStoreClient\EventId; -use Prooph\EventStoreClient\EventStoreSubscription; use Prooph\EventStoreClient\Exception\RuntimeException; use Prooph\EventStoreClient\Internal\Message\StartPersistentSubscriptionMessage; use Prooph\EventStoreClient\Internal\ResolvedEvent as InternalResolvedEvent; @@ -31,7 +29,6 @@ use Prooph\EventStoreClient\PersistentSubscriptionNakEventAction; use Prooph\EventStoreClient\PersistentSubscriptionResolvedEvent; use Prooph\EventStoreClient\ResolvedEvent; -use Prooph\EventStoreClient\SubscriptionDropped; use Prooph\EventStoreClient\SubscriptionDropReason; use Prooph\EventStoreClient\UserCredentials; use Psr\Log\LoggerInterface as Logger; @@ -53,9 +50,9 @@ class EventStorePersistentSubscription private $subscriptionId; /** @var string */ private $streamId; - /** @var EventAppearedOnPersistentSubscription */ + /** @var callable */ private $eventAppeared; - /** @var PersistentSubscriptionDropped|null */ + /** @var callable|null */ private $subscriptionDropped; /** @var UserCredentials|null */ private $userCredentials; @@ -117,13 +114,14 @@ public function __construct( $this->handler = $handler; } + /** @internal */ public function startSubscription( string $subscriptionId, string $streamId, int $bufferSize, ?UserCredentials $userCredentials, - EventAppearedOnSubscription $onEventAppeared, - ?SubscriptionDropped $onSubscriptionDropped, + callable $onEventAppeared, + ?callable $onSubscriptionDropped, ConnectionSettings $settings ): Promise { $deferred = new Deferred(); @@ -152,54 +150,21 @@ public function start(): Promise { $this->stopped->reset(); - $eventAppearedCallback = function ( - EventStoreSubscription $subscription, + $eventAppeared = function ( + PersistentEventStoreSubscription $subscription, PersistentSubscriptionResolvedEvent $resolvedEvent ): Promise { return $this->onEventAppeared($resolvedEvent); }; - $subscriptionDroppedCallback = function ( - EventStoreSubscription $subscription, + $subscriptionDropped = function ( + PersistentEventStoreSubscription $subscription, SubscriptionDropReason $reason, ?Throwable $exception ): void { $this->onSubscriptionDropped($reason, $exception); }; - $eventAppeared = new class($eventAppearedCallback) implements EventAppearedOnSubscription { - private $callback; - - public function __construct(callable $callback) - { - $this->callback = $callback; - } - - public function __invoke( - EventStoreSubscription $subscription, - InternalResolvedEvent $resolvedEvent - ): Promise { - return ($this->callback)($subscription, $resolvedEvent); - } - }; - - $subscriptionDropped = new class($subscriptionDroppedCallback) implements SubscriptionDropped { - private $callback; - - public function __construct(callable $callback) - { - $this->callback = $callback; - } - - public function __invoke( - EventStoreSubscription $subscription, - SubscriptionDropReason $reason, - ?Throwable $exception = null - ): void { - ($this->callback)($subscription, $reason, $exception); - } - }; - $promise = $this->startSubscription( $this->subscriptionId, $this->streamId, diff --git a/src/Internal/Message/StartPersistentSubscriptionMessage.php b/src/Internal/Message/StartPersistentSubscriptionMessage.php index c9b905bf..120eb947 100644 --- a/src/Internal/Message/StartPersistentSubscriptionMessage.php +++ b/src/Internal/Message/StartPersistentSubscriptionMessage.php @@ -14,8 +14,6 @@ namespace Prooph\EventStoreClient\Internal\Message; use Amp\Deferred; -use Prooph\EventStoreClient\EventAppearedOnSubscription; -use Prooph\EventStoreClient\SubscriptionDropped; use Prooph\EventStoreClient\UserCredentials; /** @internal */ @@ -31,9 +29,9 @@ class StartPersistentSubscriptionMessage implements Message private $bufferSize; /** @var UserCredentials|null */ private $userCredentials; - /** @var EventAppearedOnSubscription */ + /** @var callable */ private $eventAppeared; - /** @var SubscriptionDropped|null */ + /** @var callable|null */ private $subscriptionDropped; /** @var int */ private $maxRetries; @@ -46,8 +44,8 @@ public function __construct( string $streamId, int $bufferSize, ?UserCredentials $userCredentials, - EventAppearedOnSubscription $eventAppeared, - ?SubscriptionDropped $subscriptionDropped, + callable $eventAppeared, + ?callable $subscriptionDropped, int $maxRetries, int $timeout ) { @@ -87,12 +85,12 @@ public function userCredentials(): ?UserCredentials return $this->userCredentials; } - public function eventAppeared(): EventAppearedOnSubscription + public function eventAppeared(): callable { return $this->eventAppeared; } - public function subscriptionDropped(): ?SubscriptionDropped + public function subscriptionDropped(): ?callable { return $this->subscriptionDropped; } diff --git a/tests/PersistentSubscriptionManagement/persistent_subscription_manager.php b/tests/PersistentSubscriptionManagement/persistent_subscription_manager.php index e08c67df..83d173eb 100644 --- a/tests/PersistentSubscriptionManagement/persistent_subscription_manager.php +++ b/tests/PersistentSubscriptionManagement/persistent_subscription_manager.php @@ -23,11 +23,11 @@ use Prooph\EventStoreClient\Exception\InvalidArgumentException; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionNakEventAction; use Prooph\EventStoreClient\PersistentSubscriptions\PersistentSubscriptionDetails; use Prooph\EventStoreClient\PersistentSubscriptions\PersistentSubscriptionsManager; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use ProophTest\EventStoreClient\CountdownEvent; use ProophTest\EventStoreClient\DefaultData; @@ -259,7 +259,7 @@ public function __invoke( $this->sub->stop(); - $this->manager->replayParkedMessages($this->stream, 'existing'); + yield $this->manager->replayParkedMessages($this->stream, 'existing', DefaultData::adminCredentials()); $event = new CountdownEvent(2); diff --git a/tests/a_nak_in_subscription_handler_in_autoack_mode_drops_the_subscription.php b/tests/a_nak_in_subscription_handler_in_autoack_mode_drops_the_subscription.php index 2dff18bd..5e521b49 100644 --- a/tests/a_nak_in_subscription_handler_in_autoack_mode_drops_the_subscription.php +++ b/tests/a_nak_in_subscription_handler_in_autoack_mode_drops_the_subscription.php @@ -25,9 +25,9 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionDropped; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\SubscriptionDropReason; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/catch_up_subscription_handles_errors.php b/tests/catch_up_subscription_handles_errors.php index 0a7b0eff..05472923 100644 --- a/tests/catch_up_subscription_handles_errors.php +++ b/tests/catch_up_subscription_handles_errors.php @@ -33,11 +33,11 @@ use Prooph\EventStoreClient\EventStoreSubscription; use Prooph\EventStoreClient\Internal\EventStoreCatchUpSubscription; use Prooph\EventStoreClient\Internal\EventStoreStreamCatchUpSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\Internal\VolatileEventStoreSubscription; use Prooph\EventStoreClient\LiveProcessingStarted; use Prooph\EventStoreClient\ReadDirection; use Prooph\EventStoreClient\RecordedEvent; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\SliceReadStatus; use Prooph\EventStoreClient\StreamEventsSlice; use Prooph\EventStoreClient\SubscriptionDropped; diff --git a/tests/catchup_subscription_handles_small_batch_sizes.php b/tests/catchup_subscription_handles_small_batch_sizes.php index 3146c8ab..1e92d8fa 100644 --- a/tests/catchup_subscription_handles_small_batch_sizes.php +++ b/tests/catchup_subscription_handles_small_batch_sizes.php @@ -25,8 +25,8 @@ use Prooph\EventStoreClient\EventStoreConnection; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStoreCatchUpSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\LiveProcessingStarted; +use Prooph\EventStoreClient\ResolvedEvent; use ProophTest\EventStoreClient\Helper\TestConnection; use Throwable; use function Amp\call; diff --git a/tests/connect_to_existing_persistent_subscription_with_max_one_client.php b/tests/connect_to_existing_persistent_subscription_with_max_one_client.php index e8127894..495658b8 100644 --- a/tests/connect_to_existing_persistent_subscription_with_max_one_client.php +++ b/tests/connect_to_existing_persistent_subscription_with_max_one_client.php @@ -20,8 +20,8 @@ use Prooph\EventStoreClient\EventAppearedOnPersistentSubscription; use Prooph\EventStoreClient\Exception\MaximumSubscribersReachedException; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/connect_to_existing_persistent_subscription_with_permissions.php b/tests/connect_to_existing_persistent_subscription_with_permissions.php index 7734f1b0..b365c174 100644 --- a/tests/connect_to_existing_persistent_subscription_with_permissions.php +++ b/tests/connect_to_existing_persistent_subscription_with_permissions.php @@ -19,8 +19,8 @@ use PHPUnit\Framework\TestCase; use Prooph\EventStoreClient\EventAppearedOnPersistentSubscription; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_and_events_in_it.php b/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_and_events_in_it.php index cd3db9e7..e33a534c 100644 --- a/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_and_events_in_it.php +++ b/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_and_events_in_it.php @@ -23,8 +23,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; use function Amp\call; diff --git a/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_and_no_stream.php b/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_and_no_stream.php index 8b80ada7..3f22658c 100644 --- a/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_and_no_stream.php +++ b/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_and_no_stream.php @@ -23,8 +23,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; use function Amp\call; diff --git a/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_not_set_and_events_in_it.php b/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_not_set_and_events_in_it.php index 62c9db66..82ac0af6 100644 --- a/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_not_set_and_events_in_it.php +++ b/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_not_set_and_events_in_it.php @@ -23,8 +23,8 @@ use Prooph\EventStoreClient\EventData; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; use function Amp\call; diff --git a/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_not_set_and_events_in_it_then_event_written.php b/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_not_set_and_events_in_it_then_event_written.php index 5990234f..0d2f6434 100644 --- a/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_not_set_and_events_in_it_then_event_written.php +++ b/tests/connect_to_existing_persistent_subscription_with_start_from_beginning_not_set_and_events_in_it_then_event_written.php @@ -23,8 +23,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/connect_to_existing_persistent_subscription_with_start_from_two_and_no_stream.php b/tests/connect_to_existing_persistent_subscription_with_start_from_two_and_no_stream.php index b4275cf7..9b91c2b8 100644 --- a/tests/connect_to_existing_persistent_subscription_with_start_from_two_and_no_stream.php +++ b/tests/connect_to_existing_persistent_subscription_with_start_from_two_and_no_stream.php @@ -23,8 +23,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_and_events_in_it.php b/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_and_events_in_it.php index 6dd86403..b840e497 100644 --- a/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_and_events_in_it.php +++ b/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_and_events_in_it.php @@ -23,8 +23,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; use function Amp\call; diff --git a/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_and_events_in_it_then_event_written.php b/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_and_events_in_it_then_event_written.php index 142c85b2..22ff0968 100644 --- a/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_and_events_in_it_then_event_written.php +++ b/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_and_events_in_it_then_event_written.php @@ -23,8 +23,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; use function Amp\call; diff --git a/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_higher_than_x_and_events_in_it_then_event_written.php b/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_higher_than_x_and_events_in_it_then_event_written.php index 85ab6af5..1bfe97e5 100644 --- a/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_higher_than_x_and_events_in_it_then_event_written.php +++ b/tests/connect_to_existing_persistent_subscription_with_start_from_x_set_higher_than_x_and_events_in_it_then_event_written.php @@ -23,8 +23,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/connect_to_existing_persistent_subscription_without_permissions.php b/tests/connect_to_existing_persistent_subscription_without_permissions.php index b79b7d98..cff1678e 100644 --- a/tests/connect_to_existing_persistent_subscription_without_permissions.php +++ b/tests/connect_to_existing_persistent_subscription_without_permissions.php @@ -20,8 +20,8 @@ use Prooph\EventStoreClient\EventAppearedOnPersistentSubscription; use Prooph\EventStoreClient\Exception\AccessDeniedException; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/connect_to_non_existing_persistent_subscription_with_permissions.php b/tests/connect_to_non_existing_persistent_subscription_with_permissions.php index c56e0ff0..39f55cd8 100644 --- a/tests/connect_to_non_existing_persistent_subscription_with_permissions.php +++ b/tests/connect_to_non_existing_persistent_subscription_with_permissions.php @@ -20,7 +20,7 @@ use Prooph\EventStoreClient\EventAppearedOnPersistentSubscription; use Prooph\EventStoreClient\Exception\InvalidArgumentException; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; +use Prooph\EventStoreClient\ResolvedEvent; use Throwable; class connect_to_non_existing_persistent_subscription_with_permissions extends TestCase diff --git a/tests/connect_to_persistent_subscription_with_retries.php b/tests/connect_to_persistent_subscription_with_retries.php index b10333eb..1eac9a94 100644 --- a/tests/connect_to_persistent_subscription_with_retries.php +++ b/tests/connect_to_persistent_subscription_with_retries.php @@ -23,9 +23,9 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionNakEventAction; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/deleting_existing_persistent_subscription_with_subscriber.php b/tests/deleting_existing_persistent_subscription_with_subscriber.php index 3c29d1cf..6e0cdbf5 100644 --- a/tests/deleting_existing_persistent_subscription_with_subscriber.php +++ b/tests/deleting_existing_persistent_subscription_with_subscriber.php @@ -20,9 +20,9 @@ use PHPUnit\Framework\TestCase; use Prooph\EventStoreClient\EventAppearedOnPersistentSubscription; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionDropped; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\SubscriptionDropReason; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/event_store_connection_should.php b/tests/event_store_connection_should.php index aacc0f35..169e593c 100644 --- a/tests/event_store_connection_should.php +++ b/tests/event_store_connection_should.php @@ -19,8 +19,8 @@ use Prooph\EventStoreClient\EventAppearedOnSubscription; use Prooph\EventStoreClient\EventStoreSubscription; use Prooph\EventStoreClient\Exception\InvalidOperationException; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\Position; +use Prooph\EventStoreClient\ResolvedEvent; use ProophTest\EventStoreClient\Helper\TestConnection; use ProophTest\EventStoreClient\Helper\TestEvent; use Throwable; diff --git a/tests/happy_case_catching_up_to_link_to_events_auto_ack.php b/tests/happy_case_catching_up_to_link_to_events_auto_ack.php index 03594965..462859bd 100644 --- a/tests/happy_case_catching_up_to_link_to_events_auto_ack.php +++ b/tests/happy_case_catching_up_to_link_to_events_auto_ack.php @@ -25,8 +25,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/happy_case_catching_up_to_link_to_events_manual_ack.php b/tests/happy_case_catching_up_to_link_to_events_manual_ack.php index 8b81b4b8..57ddb2f9 100644 --- a/tests/happy_case_catching_up_to_link_to_events_manual_ack.php +++ b/tests/happy_case_catching_up_to_link_to_events_manual_ack.php @@ -25,8 +25,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/happy_case_catching_up_to_normal_events_auto_ack.php b/tests/happy_case_catching_up_to_normal_events_auto_ack.php index cb09865f..151f775c 100644 --- a/tests/happy_case_catching_up_to_normal_events_auto_ack.php +++ b/tests/happy_case_catching_up_to_normal_events_auto_ack.php @@ -24,8 +24,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/happy_case_catching_up_to_normal_events_manual_ack.php b/tests/happy_case_catching_up_to_normal_events_manual_ack.php index cbb35f52..eb7a65ae 100644 --- a/tests/happy_case_catching_up_to_normal_events_manual_ack.php +++ b/tests/happy_case_catching_up_to_normal_events_manual_ack.php @@ -24,8 +24,8 @@ use Prooph\EventStoreClient\EventId; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/happy_case_writing_and_subscribing_to_normal_events_auto_ack.php b/tests/happy_case_writing_and_subscribing_to_normal_events_auto_ack.php index 25eb592e..074ac30e 100644 --- a/tests/happy_case_writing_and_subscribing_to_normal_events_auto_ack.php +++ b/tests/happy_case_writing_and_subscribing_to_normal_events_auto_ack.php @@ -23,8 +23,8 @@ use Prooph\EventStoreClient\EventData; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; use function Amp\Promise\timeout; diff --git a/tests/happy_case_writing_and_subscribing_to_normal_events_manual_ack.php b/tests/happy_case_writing_and_subscribing_to_normal_events_manual_ack.php index c22206c1..357e4083 100644 --- a/tests/happy_case_writing_and_subscribing_to_normal_events_manual_ack.php +++ b/tests/happy_case_writing_and_subscribing_to_normal_events_manual_ack.php @@ -23,8 +23,8 @@ use Prooph\EventStoreClient\EventData; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable; use function Amp\Promise\timeout; diff --git a/tests/subscribe_should.php b/tests/subscribe_should.php index 50934221..58f7bc24 100644 --- a/tests/subscribe_should.php +++ b/tests/subscribe_should.php @@ -21,7 +21,7 @@ use Prooph\EventStoreClient\EventAppearedOnSubscription; use Prooph\EventStoreClient\EventStoreSubscription; use Prooph\EventStoreClient\ExpectedVersion; -use Prooph\EventStoreClient\Internal\ResolvedEvent; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\SubscriptionDropped; use Prooph\EventStoreClient\SubscriptionDropReason; use ProophTest\EventStoreClient\Helper\TestConnection; diff --git a/tests/subscribe_to_all_catching_up_should.php b/tests/subscribe_to_all_catching_up_should.php index 9bdf8b08..00bc333e 100644 --- a/tests/subscribe_to_all_catching_up_should.php +++ b/tests/subscribe_to_all_catching_up_should.php @@ -33,8 +33,8 @@ use Prooph\EventStoreClient\Internal\EventStoreAllCatchUpSubscription; use Prooph\EventStoreClient\Internal\EventStoreCatchUpSubscription; use Prooph\EventStoreClient\Internal\ManualResetEventSlim; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\Position; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\StreamMetadata; use Prooph\EventStoreClient\SubscriptionDropReason; use Prooph\EventStoreClient\UserCredentials; diff --git a/tests/subscribe_to_all_should.php b/tests/subscribe_to_all_should.php index 9529ae85..d4974c84 100644 --- a/tests/subscribe_to_all_should.php +++ b/tests/subscribe_to_all_should.php @@ -21,7 +21,7 @@ use Prooph\EventStoreClient\EventAppearedOnSubscription; use Prooph\EventStoreClient\EventStoreSubscription; use Prooph\EventStoreClient\ExpectedVersion; -use Prooph\EventStoreClient\Internal\ResolvedEvent; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\StreamMetadata; use Prooph\EventStoreClient\SubscriptionDropped; use Prooph\EventStoreClient\SubscriptionDropReason; diff --git a/tests/subscribe_to_stream_catching_up_should.php b/tests/subscribe_to_stream_catching_up_should.php index 641ed264..eaeaa20e 100644 --- a/tests/subscribe_to_stream_catching_up_should.php +++ b/tests/subscribe_to_stream_catching_up_should.php @@ -29,7 +29,7 @@ use Prooph\EventStoreClient\Internal\EventStoreCatchUpSubscription; use Prooph\EventStoreClient\Internal\EventStoreStreamCatchUpSubscription; use Prooph\EventStoreClient\Internal\ManualResetEventSlim; -use Prooph\EventStoreClient\Internal\ResolvedEvent; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\SubscriptionDropReason; use ProophTest\EventStoreClient\Helper\TestConnection; use ProophTest\EventStoreClient\Helper\TestEvent; diff --git a/tests/update_existing_persistent_subscription_with_subscribers.php b/tests/update_existing_persistent_subscription_with_subscribers.php index 9bea2155..0e923b5b 100644 --- a/tests/update_existing_persistent_subscription_with_subscribers.php +++ b/tests/update_existing_persistent_subscription_with_subscribers.php @@ -22,9 +22,9 @@ use Prooph\EventStoreClient\EventData; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionDropped; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\SubscriptionDropReason; use Prooph\EventStoreClient\Util\Guid; use Throwable; diff --git a/tests/when_writing_and_subscribing_to_normal_events_manual_nack.php b/tests/when_writing_and_subscribing_to_normal_events_manual_nack.php index 4499de26..6e2760f6 100644 --- a/tests/when_writing_and_subscribing_to_normal_events_manual_nack.php +++ b/tests/when_writing_and_subscribing_to_normal_events_manual_nack.php @@ -22,9 +22,9 @@ use Prooph\EventStoreClient\EventData; use Prooph\EventStoreClient\ExpectedVersion; use Prooph\EventStoreClient\Internal\EventStorePersistentSubscription; -use Prooph\EventStoreClient\Internal\ResolvedEvent; use Prooph\EventStoreClient\PersistentSubscriptionNakEventAction; use Prooph\EventStoreClient\PersistentSubscriptionSettings; +use Prooph\EventStoreClient\ResolvedEvent; use Prooph\EventStoreClient\Util\Guid; use Throwable;