diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..4e6288a7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,84 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + php-version: [8.1, 8.2] + dependencies: ["", "--prefer-lowest --prefer-stable"] + + env: + COMPOSER_CACHE_DIR: ${{ github.workspace }}/.composer/cache + PHP_CS_FIXER_CACHE_DIR: ${{ github.workspace }}/.php-cs-fixer + LOCAL_CACHE_DIR: ${{ github.workspace }}/.local + GITHUB_REF: ${{ github.ref }} + GITHUB_ACTIONS: true + GITHUB_RUN_ID: ${{ github.run_id }} + GITHUB_EVENT_NAME: ${{ github.event_name }} + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: ${{ matrix.php-version == '8.2' && matrix.dependencies == '' }} + extensions: pcov + ini-values: | + memory_limit=-1 + tools: composer:v2 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + ${{ env.COMPOSER_CACHE_DIR }} + ${{ env.PHP_CS_FIXER_CACHE_DIR }} + ${{ env.LOCAL_CACHE_DIR }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install EventStore + run: | + echo downloading EventStore 5.0.10 + wget https://github.com/EventStore/Downloads/raw/master/ubuntu/EventStore-OSS-Linux-Ubuntu-16.04-v5.0.10.tar.gz + echo extracting event-store + tar xf EventStore-OSS-Linux-Ubuntu-16.04-v5.0.10.tar.gz + cd EventStore-OSS-Linux-Ubuntu-16.04-v5.0.10 + echo starting event-store + ./run-node.sh --run-projections=all --mem-db --ext-tcp-heartbeat-interval 5000 --ext-tcp-heartbeat-timeout 1500 --ext-http-prefixes="http://*:2113/" --add-interface-prefixes=false > /dev/null & + cd .. + mkdir -p ${{ env.PHP_CS_FIXER_CACHE_DIR }} + + - name: Disable Xdebug + if: ${{ matrix.php-version != '8.2' && matrix.dependencies != '' }} + run: sudo phpdismod xdebug + + - name: Self-update Composer + run: composer self-update + + - name: Install dependencies + run: composer update --prefer-dist ${{ matrix.dependencies }} + + - name: Run tests + run: | + if [ "${{ matrix.php-version }}" == "8.2" ] && [ "${{ matrix.dependencies }}" == "" ]; then + php ./vendor/bin/phpunit --exclude-group=ignore --coverage-text --coverage-clover ./build/logs/clover.xml + else + ./vendor/bin/phpunit --exclude-group=ignore + fi + + - name: Run CS check + if: ${{ matrix.php-version == '8.2' && matrix.dependencies == '' }} + run: ./vendor/bin/php-cs-fixer fix -v --diff --dry-run + + - name: Upload coverage to Coveralls + if: ${{ matrix.php-version == '8.2' && matrix.dependencies == '' }} + run: php vendor/bin/php-coveralls -v diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 39e70969..00000000 --- a/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -sudo: required - -language: php - -matrix: - fast_finish: true - include: - - php: 7.4 - env: - - DEPENDENCIES="" - - EXECUTE_CS_CHECK=true - - TEST_COVERAGE=true - - php: 7.4 - env: - - DEPENDENCIES="--prefer-lowest --prefer-stable" - -cache: - directories: - - $HOME/.composer/cache - - $HOME/.php-cs-fixer - - $HOME/.local - -before_script: - - echo downloading EventStore 5.0.10 - - wget https://github.com/EventStore/Downloads/raw/master/ubuntu/EventStore-OSS-Linux-Ubuntu-16.04-v5.0.10.tar.gz - - echo extracting event-store - - tar xf EventStore-OSS-Linux-Ubuntu-16.04-v5.0.10.tar.gz - - cd EventStore-OSS-Linux-Ubuntu-16.04-v5.0.10 - - echo starting event-store - - ./run-node.sh --run-projections=all --mem-db --ext-tcp-heartbeat-interval 5000 --ext-tcp-heartbeat-timeout 1500 > /dev/null & - - cd .. - - mkdir -p "$HOME/.php-cs-fixer" - - if php --ri xdebug >/dev/null; then phpenv config-rm xdebug.ini; fi - - if [[ $TEST_COVERAGE == 'true' ]]; then pecl install pcov; fi - - composer self-update - - composer update --prefer-dist $DEPENDENCIES - -script: - - if [[ $TEST_COVERAGE == 'true' ]]; then php ./vendor/bin/phpunit --exclude-group=ignore --coverage-text --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit --exclude-group=ignore; fi - - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi - -after_script: - - echo stopping event-store - - wget --http-user="admin" --http-password="changeit" --post-data='' http://localhost:2113/admin/shutdown - -after_success: - - if [[ $TEST_COVERAGE == 'true' ]]; then php vendor/bin/php-coveralls -v; fi - -notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/61c75218816eebde4486 - on_success: change # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: never # options: [always|never|change] default: always diff --git a/LICENSE b/LICENSE index 8ccd1377..5eefcba4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ -Copyright (c) 2018-2022, Alexander Miertsch -Copyright (c) 2018-2022, Sascha-Oliver Prolic +Copyright (c) 2018-2024, Alexander Miertsch +Copyright (c) 2018-2024, Sascha-Oliver Prolic All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/composer.json b/composer.json index ba484604..395c7ec5 100644 --- a/composer.json +++ b/composer.json @@ -22,20 +22,23 @@ "require": { "php": "^8.1 || ^8.2", "ext-json": "*", - "amphp/amp": "^3.0", - "amphp/http-client": "^v5.0.0-beta.17", - "amphp/byte-stream": "^v2.0.2", - "amphp/socket": "^v2.2.0", + "amphp/amp": "^3.0.2", + "amphp/http": "^v2.1.1", + "amphp/http-client": "^v5.1.0", + "amphp/byte-stream": "^v2.1.1", + "amphp/socket": "^v2.3.1", "google/protobuf": "^v3.24.3", "prooph/event-store": "dev-master", - "psr/log": "^3.0" + "psr/log": "^2.0|^3.0" }, "require-dev": { - "amphp/file": "^3.0.1", + "amphp/file": "^3.1.0", "amphp/log": "^v2.0", - "amphp/parallel": "^v2.2.2", + "amphp/parallel": "^v2.2.9", "amphp/phpunit-util": "^3.0", "doctrine/instantiator": "^2.0", + "friendsofphp/php-cs-fixer": "^v3.59.3", + "php-coveralls/php-coveralls": "2.7.0", "phpspec/prophecy": "^1.17", "phpunit/phpunit": "^9.6", "prooph/php-cs-fixer-config": "^0.5.0" diff --git a/examples/demo-cluster.php b/examples/demo-cluster.php index 44696a5b..7a47532b 100644 --- a/examples/demo-cluster.php +++ b/examples/demo-cluster.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/examples/demo-persistent-subscription.php b/examples/demo-persistent-subscription.php index ea1617e1..964709c9 100644 --- a/examples/demo-persistent-subscription.php +++ b/examples/demo-persistent-subscription.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,8 +13,8 @@ namespace Prooph\EventStoreClient; -use Prooph\EventStore\EventStorePersistentSubscription; use Prooph\EventStore\EndPoint; +use Prooph\EventStore\EventStorePersistentSubscription; use Prooph\EventStore\Exception\InvalidOperationException; use Prooph\EventStore\PersistentSubscriptionSettings; use Prooph\EventStore\ResolvedEvent; diff --git a/examples/demo-read-with-logger.php b/examples/demo-read-with-logger.php index c0574a0d..cd3b6d38 100644 --- a/examples/demo-read-with-logger.php +++ b/examples/demo-read-with-logger.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/examples/demo-read.php b/examples/demo-read.php index f7d942bd..7d24b9c3 100644 --- a/examples/demo-read.php +++ b/examples/demo-read.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,8 +13,6 @@ namespace Prooph\EventStoreClient; -use Prooph\EventStore\ClientErrorEventArgs; -use Prooph\EventStore\ClientReconnectingEventArgs; use Prooph\EventStore\EndPoint; use Prooph\EventStore\EventData; use Prooph\EventStore\EventId; @@ -37,23 +35,8 @@ echo 'connection closed' . PHP_EOL; }); -$connection->onErrorOccurred(function (ClientErrorEventArgs $a): void { - echo 'error' . PHP_EOL; - var_dump($a->exception()->getMessage()); -}); - -$connection->onReconnecting(function (ClientReconnectingEventArgs $a): void { - echo 'retry: ' . $a->connection()->connectionName(); -}); +$connection->connect(); -$connection->onDisconnected(function (): void { - echo 'DISCONNECTED'; -}); -try { - $connection->connect(); -} catch (\Throwable $e) { - var_dump($e->getMessage()); die; -} $slice = $connection->readStreamEventsForward( 'foo-bar', 10, @@ -120,4 +103,4 @@ \var_dump($aeb); -$connection->close(); \ No newline at end of file +$connection->close(); diff --git a/examples/demo-subscribe-to-all-from.php b/examples/demo-subscribe-to-all-from.php index 5601801b..55b652fc 100644 --- a/examples/demo-subscribe-to-all-from.php +++ b/examples/demo-subscribe-to-all-from.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,9 +13,9 @@ namespace Prooph\EventStoreClient; -use Prooph\EventStore\EventStoreCatchUpSubscription; use Prooph\EventStore\CatchUpSubscriptionSettings; use Prooph\EventStore\EndPoint; +use Prooph\EventStore\EventStoreCatchUpSubscription; use Prooph\EventStore\ResolvedEvent; use Prooph\EventStore\SubscriptionDropReason; use Prooph\EventStore\UserCredentials; diff --git a/examples/demo-subscribe-to-all.php b/examples/demo-subscribe-to-all.php index 82fd4582..97be0c86 100644 --- a/examples/demo-subscribe-to-all.php +++ b/examples/demo-subscribe-to-all.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/examples/demo-subscribe-to-stream-from-with-logger.php b/examples/demo-subscribe-to-stream-from-with-logger.php index 338b2b47..d3618512 100644 --- a/examples/demo-subscribe-to-stream-from-with-logger.php +++ b/examples/demo-subscribe-to-stream-from-with-logger.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,9 +13,9 @@ namespace Prooph\EventStoreClient; -use Prooph\EventStore\EventStoreCatchUpSubscription; use Prooph\EventStore\CatchUpSubscriptionSettings; use Prooph\EventStore\EndPoint; +use Prooph\EventStore\EventStoreCatchUpSubscription; use Prooph\EventStore\ResolvedEvent; use Prooph\EventStore\SubscriptionDropReason; use Throwable; diff --git a/examples/demo-subscribe-to-stream-from.php b/examples/demo-subscribe-to-stream-from.php index 8e96bb20..c3bdfb01 100644 --- a/examples/demo-subscribe-to-stream-from.php +++ b/examples/demo-subscribe-to-stream-from.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,9 +13,9 @@ namespace Prooph\EventStoreClient; -use Prooph\EventStore\EventStoreCatchUpSubscription; use Prooph\EventStore\CatchUpSubscriptionSettings; use Prooph\EventStore\EndPoint; +use Prooph\EventStore\EventStoreCatchUpSubscription; use Prooph\EventStore\ResolvedEvent; use Prooph\EventStore\SubscriptionDropReason; use Throwable; diff --git a/examples/demo-subscribe-to-stream.php b/examples/demo-subscribe-to-stream.php index 709c9a82..0282babd 100644 --- a/examples/demo-subscribe-to-stream.php +++ b/examples/demo-subscribe-to-stream.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/AbstractOperation.php b/src/ClientOperations/AbstractOperation.php index e3b280ca..26658479 100644 --- a/src/ClientOperations/AbstractOperation.php +++ b/src/ClientOperations/AbstractOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/AbstractSubscriptionOperation.php b/src/ClientOperations/AbstractSubscriptionOperation.php index 592757fa..1d625be6 100644 --- a/src/ClientOperations/AbstractSubscriptionOperation.php +++ b/src/ClientOperations/AbstractSubscriptionOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -213,7 +213,6 @@ public function inspectPackage(TcpPackage $package): InspectionResult ); return new InspectionResult(InspectionDecision::EndOperation, $package->command()->name); - } } catch (\Exception $e) { $this->dropSubscription(SubscriptionDropReason::Unknown, $e); @@ -273,7 +272,7 @@ public function dropSubscription( if ($reason === SubscriptionDropReason::UserInitiated && null !== $this->subscription && null !== $connection - ) { + ) { $connection->enqueueSend($this->createUnsubscriptionPackage()); } diff --git a/src/ClientOperations/AppendToStreamOperation.php b/src/ClientOperations/AppendToStreamOperation.php index 7fef28c8..83c7c774 100644 --- a/src/ClientOperations/AppendToStreamOperation.php +++ b/src/ClientOperations/AppendToStreamOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/ClientOperation.php b/src/ClientOperations/ClientOperation.php index 748f06be..ade52957 100644 --- a/src/ClientOperations/ClientOperation.php +++ b/src/ClientOperations/ClientOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/CommitTransactionOperation.php b/src/ClientOperations/CommitTransactionOperation.php index 9379a030..b77e97f4 100644 --- a/src/ClientOperations/CommitTransactionOperation.php +++ b/src/ClientOperations/CommitTransactionOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/ConditionalAppendToStreamOperation.php b/src/ClientOperations/ConditionalAppendToStreamOperation.php index 92d5efd9..aeb52c1a 100644 --- a/src/ClientOperations/ConditionalAppendToStreamOperation.php +++ b/src/ClientOperations/ConditionalAppendToStreamOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/ConnectToPersistentSubscriptionOperation.php b/src/ClientOperations/ConnectToPersistentSubscriptionOperation.php index a6b033ee..78469be4 100644 --- a/src/ClientOperations/ConnectToPersistentSubscriptionOperation.php +++ b/src/ClientOperations/ConnectToPersistentSubscriptionOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/CreatePersistentSubscriptionOperation.php b/src/ClientOperations/CreatePersistentSubscriptionOperation.php index 7e6c5a8e..ed34cd9a 100644 --- a/src/ClientOperations/CreatePersistentSubscriptionOperation.php +++ b/src/ClientOperations/CreatePersistentSubscriptionOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/DeletePersistentSubscriptionOperation.php b/src/ClientOperations/DeletePersistentSubscriptionOperation.php index bc50a92e..da6b0de6 100644 --- a/src/ClientOperations/DeletePersistentSubscriptionOperation.php +++ b/src/ClientOperations/DeletePersistentSubscriptionOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/DeleteStreamOperation.php b/src/ClientOperations/DeleteStreamOperation.php index dd679ac0..fbee7853 100644 --- a/src/ClientOperations/DeleteStreamOperation.php +++ b/src/ClientOperations/DeleteStreamOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/ReadAllEventsBackwardOperation.php b/src/ClientOperations/ReadAllEventsBackwardOperation.php index 5961695a..87de6e6d 100644 --- a/src/ClientOperations/ReadAllEventsBackwardOperation.php +++ b/src/ClientOperations/ReadAllEventsBackwardOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/ReadAllEventsForwardOperation.php b/src/ClientOperations/ReadAllEventsForwardOperation.php index 0dc34c7a..b891c2be 100644 --- a/src/ClientOperations/ReadAllEventsForwardOperation.php +++ b/src/ClientOperations/ReadAllEventsForwardOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/ReadEventOperation.php b/src/ClientOperations/ReadEventOperation.php index eabeab85..f7b847b3 100644 --- a/src/ClientOperations/ReadEventOperation.php +++ b/src/ClientOperations/ReadEventOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/ReadStreamEventsBackwardOperation.php b/src/ClientOperations/ReadStreamEventsBackwardOperation.php index f087edf5..5d9a78b5 100644 --- a/src/ClientOperations/ReadStreamEventsBackwardOperation.php +++ b/src/ClientOperations/ReadStreamEventsBackwardOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/ReadStreamEventsForwardOperation.php b/src/ClientOperations/ReadStreamEventsForwardOperation.php index f9a766d3..b79bfad1 100644 --- a/src/ClientOperations/ReadStreamEventsForwardOperation.php +++ b/src/ClientOperations/ReadStreamEventsForwardOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/StartTransactionOperation.php b/src/ClientOperations/StartTransactionOperation.php index 2bc0bcd4..8b896ce9 100644 --- a/src/ClientOperations/StartTransactionOperation.php +++ b/src/ClientOperations/StartTransactionOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/SubscriptionOperation.php b/src/ClientOperations/SubscriptionOperation.php index a6742344..b5b39984 100644 --- a/src/ClientOperations/SubscriptionOperation.php +++ b/src/ClientOperations/SubscriptionOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/TransactionalWriteOperation.php b/src/ClientOperations/TransactionalWriteOperation.php index a4a3a97e..e8e3dc8f 100644 --- a/src/ClientOperations/TransactionalWriteOperation.php +++ b/src/ClientOperations/TransactionalWriteOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/UpdatePersistentSubscriptionOperation.php b/src/ClientOperations/UpdatePersistentSubscriptionOperation.php index 611ac163..ec35105f 100644 --- a/src/ClientOperations/UpdatePersistentSubscriptionOperation.php +++ b/src/ClientOperations/UpdatePersistentSubscriptionOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClientOperations/VolatileSubscriptionOperation.php b/src/ClientOperations/VolatileSubscriptionOperation.php index bff4dcac..57f92642 100644 --- a/src/ClientOperations/VolatileSubscriptionOperation.php +++ b/src/ClientOperations/VolatileSubscriptionOperation.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClusterSettings.php b/src/ClusterSettings.php index 7ca5d6e9..0bce7a11 100644 --- a/src/ClusterSettings.php +++ b/src/ClusterSettings.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ClusterSettingsBuilder.php b/src/ClusterSettingsBuilder.php index dd72a2e8..a9c4efd5 100644 --- a/src/ClusterSettingsBuilder.php +++ b/src/ClusterSettingsBuilder.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ConnectionSettings.php b/src/ConnectionSettings.php index fecda7b9..a9e3715f 100644 --- a/src/ConnectionSettings.php +++ b/src/ConnectionSettings.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ConnectionSettingsBuilder.php b/src/ConnectionSettingsBuilder.php index 492138ae..9ab90f88 100644 --- a/src/ConnectionSettingsBuilder.php +++ b/src/ConnectionSettingsBuilder.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/ConnectionString.php b/src/ConnectionString.php index cdb732f8..5c1cb80b 100644 --- a/src/ConnectionString.php +++ b/src/ConnectionString.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/DnsClusterSettingsBuilder.php b/src/DnsClusterSettingsBuilder.php index 2ccc2abe..7efe8e27 100644 --- a/src/DnsClusterSettingsBuilder.php +++ b/src/DnsClusterSettingsBuilder.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/EventStoreConnectionFactory.php b/src/EventStoreConnectionFactory.php index b16fa0e3..1b32d215 100644 --- a/src/EventStoreConnectionFactory.php +++ b/src/EventStoreConnectionFactory.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ClusterException.php b/src/Exception/ClusterException.php index d34eb95d..55b2b04e 100644 --- a/src/Exception/ClusterException.php +++ b/src/Exception/ClusterException.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/PackageFramingException.php b/src/Exception/PackageFramingException.php index 4a4a27e7..36d135f1 100644 --- a/src/Exception/PackageFramingException.php +++ b/src/Exception/PackageFramingException.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/PersistentSubscriptionCommandFailed.php b/src/Exception/PersistentSubscriptionCommandFailed.php index d5a4fea4..208deb68 100644 --- a/src/Exception/PersistentSubscriptionCommandFailed.php +++ b/src/Exception/PersistentSubscriptionCommandFailed.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ProjectionCommandConflict.php b/src/Exception/ProjectionCommandConflict.php index cd5cc912..fc6810dd 100644 --- a/src/Exception/ProjectionCommandConflict.php +++ b/src/Exception/ProjectionCommandConflict.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/ProjectionCommandFailed.php b/src/Exception/ProjectionCommandFailed.php index 9f0c5843..23d5999d 100644 --- a/src/Exception/ProjectionCommandFailed.php +++ b/src/Exception/ProjectionCommandFailed.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/UserCommandConflict.php b/src/Exception/UserCommandConflict.php index 84ec135d..c88a2c14 100644 --- a/src/Exception/UserCommandConflict.php +++ b/src/Exception/UserCommandConflict.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Exception/UserCommandFailed.php b/src/Exception/UserCommandFailed.php index 920faf67..ce8a8c84 100644 --- a/src/Exception/UserCommandFailed.php +++ b/src/Exception/UserCommandFailed.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/GossipSeed.php b/src/GossipSeed.php index 127f1bba..55b3ff0f 100644 --- a/src/GossipSeed.php +++ b/src/GossipSeed.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -20,12 +20,27 @@ * * @psalm-immutable */ -readonly class GossipSeed +class GossipSeed { public function __construct( - public EndPoint $endPoint, - public string $hostHeader = '', - public bool $seedOverTls = true) + private readonly EndPoint $endPoint, + private readonly string $hostHeader = '', + private readonly bool $seedOverTls = true + ) { + } + + public function endPoint(): EndPoint + { + return $this->endPoint; + } + + public function hostHeader(): string + { + return $this->hostHeader; + } + + public function seedOverTls(): bool { + return $this->seedOverTls; } } diff --git a/src/GossipSeedClusterSettingsBuilder.php b/src/GossipSeedClusterSettingsBuilder.php index f30268aa..c14ff873 100644 --- a/src/GossipSeedClusterSettingsBuilder.php +++ b/src/GossipSeedClusterSettingsBuilder.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,7 +13,6 @@ namespace Prooph\EventStoreClient; -use Prooph\EventStore\EndPoint; use Prooph\EventStore\Exception\OutOfRangeException; use Prooph\EventStore\Internal\Consts; diff --git a/src/Internal/AuthInfo.php b/src/Internal/AuthInfo.php index 76aa5059..7d918733 100644 --- a/src/Internal/AuthInfo.php +++ b/src/Internal/AuthInfo.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/ClusterDnsEndPointDiscoverer.php b/src/Internal/ClusterDnsEndPointDiscoverer.php index ebb7288e..84462c2e 100644 --- a/src/Internal/ClusterDnsEndPointDiscoverer.php +++ b/src/Internal/ClusterDnsEndPointDiscoverer.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,6 +14,7 @@ namespace Prooph\EventStoreClient\Internal; use function Amp\delay; + use Amp\Http\Client\HttpClient; use Amp\Http\Client\HttpClientBuilder; use Amp\Http\Client\Interceptor\SetRequestTimeout; @@ -58,6 +59,7 @@ public function discover(?EndPoint $failedTcpEndPoint): NodeEndPoints for ($attempt = 1; $attempt <= $this->maxDiscoverAttempts; ++$attempt) { try { $endPoints = $this->discoverEndPoint($failedTcpEndPoint); + if (null !== $endPoints) { $this->log->info(\sprintf( 'Discovering attempt %d/%d successful: best candidate is %s', @@ -68,7 +70,7 @@ public function discover(?EndPoint $failedTcpEndPoint): NodeEndPoints return $endPoints; } - } catch (\Throwable $e) { + } catch (Exception $e) { $this->log->info(\sprintf( 'Discovering attempt %d/%d failed with error: %s', $attempt, @@ -111,7 +113,6 @@ private function discoverEndPoint(?EndPoint $failedTcpEndPoint): ?NodeEndPoints } } - return null; } @@ -167,7 +168,7 @@ private function arrangeGossipCandidates(array $members): array $j = \count($members); foreach ($members as $k => $member) { - if ($members[$k]->state() === VNodeState::Manager) { + if ($members[$k]->state()->value === VNodeState::Manager) { $result[--$j] = new GossipSeed(new EndPoint($members[$k]->httpAddress(), $members[$k]->httpPort())); } else { $result[++$i] = new GossipSeed(new EndPoint($members[$k]->httpAddress(), $members[$k]->httpPort())); @@ -181,14 +182,14 @@ private function arrangeGossipCandidates(array $members): array private function tryGetGossipFrom(GossipSeed $endPoint): ?ClusterInfoDto { - $schema = $endPoint->seedOverTls ? 'https://' : 'http://'; - $uri = $schema . $endPoint->endPoint->host() . ':' . $endPoint->endPoint->port() . '/gossip?format=json'; + $schema = $endPoint->seedOverTls() ? 'https://' : 'http://'; + $uri = $schema . $endPoint->endPoint()->host() . ':' . $endPoint->endPoint()->port() . '/gossip?format=json'; $this->log->info($uri); try { $request = new Request($uri); - $header = $endPoint->hostHeader; + $header = $endPoint->hostHeader(); if (! empty($header)) { $headerData = \explode(':', $header); diff --git a/src/Internal/ConnectingPhase.php b/src/Internal/ConnectingPhase.php index e44707e3..eb67bbb8 100644 --- a/src/Internal/ConnectingPhase.php +++ b/src/Internal/ConnectingPhase.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/ConnectionState.php b/src/Internal/ConnectionState.php index 03e16b4c..5ff0399e 100644 --- a/src/Internal/ConnectionState.php +++ b/src/Internal/ConnectionState.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/EndPointDiscoverer.php b/src/Internal/EndPointDiscoverer.php index f854a7d0..a408f398 100644 --- a/src/Internal/EndPointDiscoverer.php +++ b/src/Internal/EndPointDiscoverer.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/EventMessageConverter.php b/src/Internal/EventMessageConverter.php index 1d56ebe2..a5df1980 100644 --- a/src/Internal/EventMessageConverter.php +++ b/src/Internal/EventMessageConverter.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/EventStoreAllCatchUpSubscription.php b/src/Internal/EventStoreAllCatchUpSubscription.php index 218366f7..e78a7f0a 100644 --- a/src/Internal/EventStoreAllCatchUpSubscription.php +++ b/src/Internal/EventStoreAllCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,6 +15,7 @@ use function Amp\async; use function Amp\delay; + use Closure; use Exception; use Prooph\EventStore\AllEventsSlice; diff --git a/src/Internal/EventStoreCatchUpSubscription.php b/src/Internal/EventStoreCatchUpSubscription.php index 7370d574..f022ef6c 100644 --- a/src/Internal/EventStoreCatchUpSubscription.php +++ b/src/Internal/EventStoreCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,6 +14,7 @@ namespace Prooph\EventStoreClient\Internal; use function Amp\async; + use Amp\DeferredFuture; use Amp\TimeoutCancellation; use Closure; diff --git a/src/Internal/EventStoreConnectionLogicHandler.php b/src/Internal/EventStoreConnectionLogicHandler.php index 617f2a15..8b50e37e 100644 --- a/src/Internal/EventStoreConnectionLogicHandler.php +++ b/src/Internal/EventStoreConnectionLogicHandler.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -154,7 +154,7 @@ function (StartPersistentSubscriptionMessage $message): void { $this->handler->registerHandler( EstablishTcpConnectionMessage::class, function (EstablishTcpConnectionMessage $message): void { - $this->establishTcpConnection($message->nodeEndPoints()); + $this->establishTcpConnection($message->deferred(), $message->nodeEndPoints()); } ); $this->handler->registerHandler( @@ -172,11 +172,7 @@ function (TcpConnectionErrorMessage $message): void { $this->handler->registerHandler( TcpConnectionClosedMessage::class, function (TcpConnectionClosedMessage $message): void { - $this->tcpConnectionClosed($message->tcpPackageConnection()); - - if ($message->exception()) { - throw $message->exception(); - } + $this->tcpConnectionClosed($message->tcpPackageConnection(), $message->exception()); } ); $this->handler->registerHandler( @@ -209,6 +205,7 @@ private function startConnection(DeferredFuture $deferred, EndPointDiscoverer $e $this->timerTick(); }); EventLoop::unreference($this->timerTickWatcherId); + $this->endPointDiscoverer = $endPointDiscoverer; $this->state = ConnectionState::Connecting; $this->connectingPhase = ConnectingPhase::Reconnecting; @@ -237,11 +234,9 @@ private function discoverEndPoint(?DeferredFuture $deferred): void { $this->logDebug('discoverEndPoint'); - if ($this->state !== ConnectionState::Connecting) { - return; - } - - if ($this->connectingPhase !== ConnectingPhase::Reconnecting) { + if ($this->state !== ConnectionState::Connecting + || $this->connectingPhase !== ConnectingPhase::Reconnecting + ) { return; } @@ -260,14 +255,16 @@ private function discoverEndPoint(?DeferredFuture $deferred): void return; } - $this->enqueueMessage(new EstablishTcpConnectionMessage($endpoints)); - - $deferred?->complete(); + $this->enqueueMessage(new EstablishTcpConnectionMessage($deferred, $endpoints)); } /** @throws Exception */ private function closeConnection(string $reason, ?Throwable $exception = null): void { + if ($this->timerTickWatcherId) { + EventLoop::cancel($this->timerTickWatcherId); + } + if ($this->state === ConnectionState::Closed) { if ($exception) { $this->logDebug('CloseConnection IGNORED because is ESConnection is CLOSED, reason %s, exception %s', $reason, $exception->getMessage()); @@ -282,10 +279,6 @@ private function closeConnection(string $reason, ?Throwable $exception = null): $this->state = ConnectionState::Closed; - if ($this->timerTickWatcherId) { - EventLoop::cancel($this->timerTickWatcherId); - } - $this->operations->cleanUp(); $this->subscriptions->cleanUp(); $this->closeTcpConnection(); @@ -300,7 +293,7 @@ private function closeConnection(string $reason, ?Throwable $exception = null): } /** @throws \Exception */ - private function establishTcpConnection(NodeEndPoints $endPoints): void + private function establishTcpConnection(?DeferredFuture $deferred, NodeEndPoints $endPoints): void { $endPoint = $this->settings->useSslConnection() ? $endPoints->secureTcpEndPoint() ?? $endPoints->tcpEndPoint() @@ -309,6 +302,8 @@ private function establishTcpConnection(NodeEndPoints $endPoints): void if (null === $endPoint) { $this->closeConnection('No end point to node specified'); + $deferred?->complete(); + return; } @@ -317,6 +312,8 @@ private function establishTcpConnection(NodeEndPoints $endPoints): void if ($this->state !== ConnectionState::Connecting || $this->connectingPhase !== ConnectingPhase::EndPointDiscovery ) { + $deferred?->complete(); + return; } @@ -344,11 +341,21 @@ function (TcpPackageConnection $connection, Throwable $exception): void { } ); - $this->connection->connect(); + try { + $this->connection->connect(); + } catch (Throwable $e) { + $deferred?->error($e); + + return; + } if (! $this->connection->isClosed()) { $this->connection->startReceiving(); } + + if (! $deferred?->isComplete()) { + $deferred?->complete(); + } } /** @throws \Exception */ @@ -968,7 +975,7 @@ private function reconnectTo(NodeEndPoints $endPoints): void $this->state = ConnectionState::Connecting; $this->connectingPhase = ConnectingPhase::EndPointDiscovery; - $this->establishTcpConnection($endPoints); + $this->establishTcpConnection(null, $endPoints); } private function logDebug(string $message, string ...$parameters): void diff --git a/src/Internal/EventStoreNodeConnection.php b/src/Internal/EventStoreNodeConnection.php index 6e6eb046..0cf9d886 100644 --- a/src/Internal/EventStoreNodeConnection.php +++ b/src/Internal/EventStoreNodeConnection.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/EventStorePersistentSubscription.php b/src/Internal/EventStorePersistentSubscription.php index a0b22e90..a1f3f5c0 100644 --- a/src/Internal/EventStorePersistentSubscription.php +++ b/src/Internal/EventStorePersistentSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,8 +14,11 @@ namespace Prooph\EventStoreClient\Internal; use function Amp\async; + use Amp\DeferredFuture; + use function Amp\delay; + use Amp\TimeoutCancellation; use Closure; use Exception; diff --git a/src/Internal/EventStoreStreamCatchUpSubscription.php b/src/Internal/EventStoreStreamCatchUpSubscription.php index 13afc8e1..f0cf6ea6 100644 --- a/src/Internal/EventStoreStreamCatchUpSubscription.php +++ b/src/Internal/EventStoreStreamCatchUpSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,6 +15,7 @@ use function Amp\async; use function Amp\delay; + use Closure; use Exception; use Prooph\EventStore\CatchUpSubscriptionSettings; diff --git a/src/Internal/HeartbeatInfo.php b/src/Internal/HeartbeatInfo.php index c0f9d1d9..4fc4fe59 100644 --- a/src/Internal/HeartbeatInfo.php +++ b/src/Internal/HeartbeatInfo.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/IdentifyInfo.php b/src/Internal/IdentifyInfo.php index cbd8e185..39f5364c 100644 --- a/src/Internal/IdentifyInfo.php +++ b/src/Internal/IdentifyInfo.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Message/CloseConnectionMessage.php b/src/Internal/Message/CloseConnectionMessage.php index 3613489e..0fb02447 100644 --- a/src/Internal/Message/CloseConnectionMessage.php +++ b/src/Internal/Message/CloseConnectionMessage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Message/EstablishTcpConnectionMessage.php b/src/Internal/Message/EstablishTcpConnectionMessage.php index 006e6909..34c22097 100644 --- a/src/Internal/Message/EstablishTcpConnectionMessage.php +++ b/src/Internal/Message/EstablishTcpConnectionMessage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,6 +13,7 @@ namespace Prooph\EventStoreClient\Internal\Message; +use Amp\DeferredFuture; use Prooph\EventStoreClient\Internal\NodeEndPoints; /** @@ -22,10 +23,15 @@ */ class EstablishTcpConnectionMessage implements Message { - public function __construct(private readonly NodeEndPoints $nodeEndPoints) + public function __construct(private readonly ?DeferredFuture $deferred, private readonly NodeEndPoints $nodeEndPoints) { } + public function deferred(): ?DeferredFuture + { + return $this->deferred; + } + public function nodeEndPoints(): NodeEndPoints { return $this->nodeEndPoints; diff --git a/src/Internal/Message/HandleTcpPackageMessage.php b/src/Internal/Message/HandleTcpPackageMessage.php index 37ed78b5..ee6b3131 100644 --- a/src/Internal/Message/HandleTcpPackageMessage.php +++ b/src/Internal/Message/HandleTcpPackageMessage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Message/Message.php b/src/Internal/Message/Message.php index c660d2ee..41f593d5 100644 --- a/src/Internal/Message/Message.php +++ b/src/Internal/Message/Message.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Message/StartConnectionMessage.php b/src/Internal/Message/StartConnectionMessage.php index c5122444..2c0dc7c6 100644 --- a/src/Internal/Message/StartConnectionMessage.php +++ b/src/Internal/Message/StartConnectionMessage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Message/StartOperationMessage.php b/src/Internal/Message/StartOperationMessage.php index bbc3abeb..dd3393c9 100644 --- a/src/Internal/Message/StartOperationMessage.php +++ b/src/Internal/Message/StartOperationMessage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Message/StartPersistentSubscriptionMessage.php b/src/Internal/Message/StartPersistentSubscriptionMessage.php index a3a5feae..b10d9af1 100644 --- a/src/Internal/Message/StartPersistentSubscriptionMessage.php +++ b/src/Internal/Message/StartPersistentSubscriptionMessage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Message/StartSubscriptionMessage.php b/src/Internal/Message/StartSubscriptionMessage.php index 673d2d45..a487ae2a 100644 --- a/src/Internal/Message/StartSubscriptionMessage.php +++ b/src/Internal/Message/StartSubscriptionMessage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Message/TcpConnectionClosedMessage.php b/src/Internal/Message/TcpConnectionClosedMessage.php index 8451c907..b214dc34 100644 --- a/src/Internal/Message/TcpConnectionClosedMessage.php +++ b/src/Internal/Message/TcpConnectionClosedMessage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Message/TcpConnectionErrorMessage.php b/src/Internal/Message/TcpConnectionErrorMessage.php index 4c806f0c..77b52930 100644 --- a/src/Internal/Message/TcpConnectionErrorMessage.php +++ b/src/Internal/Message/TcpConnectionErrorMessage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/Message/TcpConnectionEstablishedMessage.php b/src/Internal/Message/TcpConnectionEstablishedMessage.php index abf3273a..46702124 100644 --- a/src/Internal/Message/TcpConnectionEstablishedMessage.php +++ b/src/Internal/Message/TcpConnectionEstablishedMessage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/MessageHandler.php b/src/Internal/MessageHandler.php index 98fe8081..81b51173 100644 --- a/src/Internal/MessageHandler.php +++ b/src/Internal/MessageHandler.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/NewEventConverter.php b/src/Internal/NewEventConverter.php index 0b1d7067..508b56ee 100644 --- a/src/Internal/NewEventConverter.php +++ b/src/Internal/NewEventConverter.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/NodeEndPoints.php b/src/Internal/NodeEndPoints.php index 49095c04..5b711bc2 100644 --- a/src/Internal/NodeEndPoints.php +++ b/src/Internal/NodeEndPoints.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/OperationItem.php b/src/Internal/OperationItem.php index 5a0f7dc9..4bdeca0d 100644 --- a/src/Internal/OperationItem.php +++ b/src/Internal/OperationItem.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/OperationsManager.php b/src/Internal/OperationsManager.php index cc27eff2..9294039c 100644 --- a/src/Internal/OperationsManager.php +++ b/src/Internal/OperationsManager.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/ReconnectionInfo.php b/src/Internal/ReconnectionInfo.php index 54df6fd6..33ea5983 100644 --- a/src/Internal/ReconnectionInfo.php +++ b/src/Internal/ReconnectionInfo.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/SingleEndpointDiscoverer.php b/src/Internal/SingleEndpointDiscoverer.php index 51ff0f7c..d9a6c419 100644 --- a/src/Internal/SingleEndpointDiscoverer.php +++ b/src/Internal/SingleEndpointDiscoverer.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/StaticEndPointDiscoverer.php b/src/Internal/StaticEndPointDiscoverer.php index b4ec7eea..89290560 100644 --- a/src/Internal/StaticEndPointDiscoverer.php +++ b/src/Internal/StaticEndPointDiscoverer.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/StopWatch.php b/src/Internal/StopWatch.php index 16f3a185..a0e2a3c4 100644 --- a/src/Internal/StopWatch.php +++ b/src/Internal/StopWatch.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,23 +13,27 @@ namespace Prooph\EventStoreClient\Internal; +use Prooph\EventStore\Util\DateTime; + /** @internal */ class StopWatch { - private function __construct(private readonly float $started) + private function __construct(private readonly int $started) { } public static function startNew(): self { - $started = microtime(true); + $now = DateTime::utcNow(); + $started = (int) \floor((float) $now->format('U.u') * 1000); return new self($started); } - public function elapsed(): float + public function elapsed(): int { - $timestamp = microtime(true);; + $now = DateTime::utcNow(); + $timestamp = (int) \floor((float) $now->format('U.u') * 1000); return $timestamp - $this->started; } diff --git a/src/Internal/SubscriptionItem.php b/src/Internal/SubscriptionItem.php index c6ef2332..2512f752 100644 --- a/src/Internal/SubscriptionItem.php +++ b/src/Internal/SubscriptionItem.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/SubscriptionsManager.php b/src/Internal/SubscriptionsManager.php index 31c36dd4..0475ee29 100644 --- a/src/Internal/SubscriptionsManager.php +++ b/src/Internal/SubscriptionsManager.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Internal/VolatileEventStoreSubscription.php b/src/Internal/VolatileEventStoreSubscription.php index 15c96bc2..970babb6 100644 --- a/src/Internal/VolatileEventStoreSubscription.php +++ b/src/Internal/VolatileEventStoreSubscription.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Messages/ClusterMessages/ClusterInfoDto.php b/src/Messages/ClusterMessages/ClusterInfoDto.php index c2b4b90d..30aa81cb 100644 --- a/src/Messages/ClusterMessages/ClusterInfoDto.php +++ b/src/Messages/ClusterMessages/ClusterInfoDto.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Messages/ClusterMessages/MemberInfoDto.php b/src/Messages/ClusterMessages/MemberInfoDto.php index 83205153..77468259 100644 --- a/src/Messages/ClusterMessages/MemberInfoDto.php +++ b/src/Messages/ClusterMessages/MemberInfoDto.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Messages/ClusterMessages/VNodeState.php b/src/Messages/ClusterMessages/VNodeState.php index 6ae7ef9d..17c92896 100644 --- a/src/Messages/ClusterMessages/VNodeState.php +++ b/src/Messages/ClusterMessages/VNodeState.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,7 +21,7 @@ enum VNodeState: string case PreReadOnlyReplica = 'PreReadOnlyReplica'; case PreReplica = 'PreReplica'; case CatchingUp = 'CatchingUp'; - case Clone = 'Clone'; + case Clone_ = 'Clone'; case ReadOnlyReplica = 'ReadOnlyReplica'; case Slave = 'Slave'; case Follower = 'Follower'; diff --git a/src/PersistentSubscriptions/PersistentSubscriptionsClient.php b/src/PersistentSubscriptions/PersistentSubscriptionsClient.php index ebbab6ed..8e22708a 100644 --- a/src/PersistentSubscriptions/PersistentSubscriptionsClient.php +++ b/src/PersistentSubscriptions/PersistentSubscriptionsClient.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/PersistentSubscriptions/PersistentSubscriptionsManager.php b/src/PersistentSubscriptions/PersistentSubscriptionsManager.php index c3916e49..a9056a13 100644 --- a/src/PersistentSubscriptions/PersistentSubscriptionsManager.php +++ b/src/PersistentSubscriptions/PersistentSubscriptionsManager.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projections/ProjectionsClient.php b/src/Projections/ProjectionsClient.php index 78a21405..664d15cf 100644 --- a/src/Projections/ProjectionsClient.php +++ b/src/Projections/ProjectionsClient.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projections/ProjectionsManager.php b/src/Projections/ProjectionsManager.php index 266cf6e3..939f7ebc 100644 --- a/src/Projections/ProjectionsManager.php +++ b/src/Projections/ProjectionsManager.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Projections/QueryManager.php b/src/Projections/QueryManager.php index 2aaf2659..425150b6 100644 --- a/src/Projections/QueryManager.php +++ b/src/Projections/QueryManager.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,6 +15,7 @@ use function Amp\async; use function Amp\delay; + use Amp\TimeoutCancellation; use Prooph\EventStore\EndPoint; use Prooph\EventStore\Projections\ProjectionDetails; diff --git a/src/SystemData/InspectionDecision.php b/src/SystemData/InspectionDecision.php index b5895b58..9e0b3b29 100644 --- a/src/SystemData/InspectionDecision.php +++ b/src/SystemData/InspectionDecision.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/SystemData/InspectionResult.php b/src/SystemData/InspectionResult.php index 493919eb..233b27bc 100644 --- a/src/SystemData/InspectionResult.php +++ b/src/SystemData/InspectionResult.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -36,8 +36,7 @@ public function __construct( string $description, ?EndPoint $tcpEndPoint = null, ?EndPoint $secureTcpEndPoint = null - ) - { + ) { if ($decision === InspectionDecision::Reconnect) { if (null === $tcpEndPoint) { throw new InvalidArgumentException('TcpEndPoint is null for reconnect'); diff --git a/src/SystemData/TcpCommand.php b/src/SystemData/TcpCommand.php index 8b177229..ccbc867b 100644 --- a/src/SystemData/TcpCommand.php +++ b/src/SystemData/TcpCommand.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/SystemData/TcpFlags.php b/src/SystemData/TcpFlags.php index f523f736..e30f0eaf 100644 --- a/src/SystemData/TcpFlags.php +++ b/src/SystemData/TcpFlags.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/SystemData/TcpPackage.php b/src/SystemData/TcpPackage.php index 78414a6c..9dad1d18 100644 --- a/src/SystemData/TcpPackage.php +++ b/src/SystemData/TcpPackage.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Transport/Http/HttpClient.php b/src/Transport/Http/HttpClient.php index 78e54729..8bd8c96b 100644 --- a/src/Transport/Http/HttpClient.php +++ b/src/Transport/Http/HttpClient.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Transport/Tcp/LengthPrefixMessageFramer.php b/src/Transport/Tcp/LengthPrefixMessageFramer.php index f274ca59..8611d888 100644 --- a/src/Transport/Tcp/LengthPrefixMessageFramer.php +++ b/src/Transport/Tcp/LengthPrefixMessageFramer.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/Transport/Tcp/TcpPackageConnection.php b/src/Transport/Tcp/TcpPackageConnection.php index afb38a60..d23e3d4b 100644 --- a/src/Transport/Tcp/TcpPackageConnection.php +++ b/src/Transport/Tcp/TcpPackageConnection.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,9 @@ namespace Prooph\EventStoreClient\Transport\Tcp; use Amp\Socket\ClientTlsContext; + use function Amp\Socket\connect; + use Amp\Socket\ConnectContext; use Amp\Socket\ConnectException; use Amp\Socket\ResourceSocket; @@ -120,6 +122,8 @@ public function connect(): void $e->getMessage() )); ($this->connectionClosed)($this, $e); + + throw $e; } catch (Exception $e) { $this->isClosed = true; $this->log->debug(\sprintf( @@ -129,6 +133,8 @@ public function connect(): void $e->getMessage() )); ($this->connectionClosed)($this, $e); + + throw $e; } $this->log->debug(\sprintf( diff --git a/src/Uri.php b/src/Uri.php index 630b11d5..7a3ce4da 100644 --- a/src/Uri.php +++ b/src/Uri.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/UserManagement/UsersClient.php b/src/UserManagement/UsersClient.php index 65b96361..97e981ef 100644 --- a/src/UserManagement/UsersClient.php +++ b/src/UserManagement/UsersClient.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/src/UserManagement/UsersManager.php b/src/UserManagement/UsersManager.php index 7637851d..20391e77 100644 --- a/src/UserManagement/UsersManager.php +++ b/src/UserManagement/UsersManager.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/CountdownEvent.php b/tests/CountdownEvent.php index 97680061..8f77dc30 100644 --- a/tests/CountdownEvent.php +++ b/tests/CountdownEvent.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/DefaultData.php b/tests/DefaultData.php index 4da4b7c9..ee1d4818 100644 --- a/tests/DefaultData.php +++ b/tests/DefaultData.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/EventNumber.php b/tests/EventNumber.php index 69df683b..4141b549 100644 --- a/tests/EventNumber.php +++ b/tests/EventNumber.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/EventStoreConnectionTestCase.php b/tests/EventStoreConnectionTestCase.php index 28bde8d8..c2ee0d86 100644 --- a/tests/EventStoreConnectionTestCase.php +++ b/tests/EventStoreConnectionTestCase.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/FakeEventStoreConnection.php b/tests/FakeEventStoreConnection.php index af0961d0..7ef0d151 100644 --- a/tests/FakeEventStoreConnection.php +++ b/tests/FakeEventStoreConnection.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Helper/EventDataComparer.php b/tests/Helper/EventDataComparer.php index 6e2a2221..2b85105c 100644 --- a/tests/Helper/EventDataComparer.php +++ b/tests/Helper/EventDataComparer.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Helper/EventsStream.php b/tests/Helper/EventsStream.php index b28b979a..580080c7 100644 --- a/tests/Helper/EventsStream.php +++ b/tests/Helper/EventsStream.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Helper/OngoingTransaction.php b/tests/Helper/OngoingTransaction.php index e423a3c8..caf03905 100644 --- a/tests/Helper/OngoingTransaction.php +++ b/tests/Helper/OngoingTransaction.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Helper/ParallelTransactionTask.php b/tests/Helper/ParallelTransactionTask.php index aea7184f..b3c3cd34 100644 --- a/tests/Helper/ParallelTransactionTask.php +++ b/tests/Helper/ParallelTransactionTask.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Helper/StreamWriter.php b/tests/Helper/StreamWriter.php index 80b5a7ef..c30e202d 100644 --- a/tests/Helper/StreamWriter.php +++ b/tests/Helper/StreamWriter.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Helper/TailWriter.php b/tests/Helper/TailWriter.php index 3e1c8c65..7c5c2e94 100644 --- a/tests/Helper/TailWriter.php +++ b/tests/Helper/TailWriter.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Helper/TestConnection.php b/tests/Helper/TestConnection.php index 60fc6f2d..fc1ffcc9 100644 --- a/tests/Helper/TestConnection.php +++ b/tests/Helper/TestConnection.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Helper/TestEvent.php b/tests/Helper/TestEvent.php index f67c993e..5c30e5aa 100644 --- a/tests/Helper/TestEvent.php +++ b/tests/Helper/TestEvent.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Helper/TransactionalWriter.php b/tests/Helper/TransactionalWriter.php index 224a36b0..012079f4 100644 --- a/tests/Helper/TransactionalWriter.php +++ b/tests/Helper/TransactionalWriter.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/PersistentSubscriptionManagement/persistent_subscription_manager.php b/tests/PersistentSubscriptionManagement/persistent_subscription_manager.php index a3758bea..f5b6abd9 100644 --- a/tests/PersistentSubscriptionManagement/persistent_subscription_manager.php +++ b/tests/PersistentSubscriptionManagement/persistent_subscription_manager.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/ProjectionSpecification.php b/tests/ProjectionSpecification.php index 85f87119..f0a9cb54 100644 --- a/tests/ProjectionSpecification.php +++ b/tests/ProjectionSpecification.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/AuthenticationTestCase.php b/tests/Security/AuthenticationTestCase.php index 7b12eb80..c938ea5d 100644 --- a/tests/Security/AuthenticationTestCase.php +++ b/tests/Security/AuthenticationTestCase.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/all_stream_with_no_acl_security.php b/tests/Security/all_stream_with_no_acl_security.php index bf32928f..14603bfd 100644 --- a/tests/Security/all_stream_with_no_acl_security.php +++ b/tests/Security/all_stream_with_no_acl_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/authorized_default_credentials_security.php b/tests/Security/authorized_default_credentials_security.php index fdb50280..44819851 100644 --- a/tests/Security/authorized_default_credentials_security.php +++ b/tests/Security/authorized_default_credentials_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/delete_stream_security.php b/tests/Security/delete_stream_security.php index 991f264d..0b51410b 100644 --- a/tests/Security/delete_stream_security.php +++ b/tests/Security/delete_stream_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/multiple_role_security.php b/tests/Security/multiple_role_security.php index b8082a7e..c1d91b5b 100644 --- a/tests/Security/multiple_role_security.php +++ b/tests/Security/multiple_role_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/overriden_system_stream_security.php b/tests/Security/overriden_system_stream_security.php index 813ab932..4862384e 100644 --- a/tests/Security/overriden_system_stream_security.php +++ b/tests/Security/overriden_system_stream_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/overriden_system_stream_security_for_all.php b/tests/Security/overriden_system_stream_security_for_all.php index 96137438..5566a048 100644 --- a/tests/Security/overriden_system_stream_security_for_all.php +++ b/tests/Security/overriden_system_stream_security_for_all.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/overriden_user_stream_security.php b/tests/Security/overriden_user_stream_security.php index b4012776..f0354bc9 100644 --- a/tests/Security/overriden_user_stream_security.php +++ b/tests/Security/overriden_user_stream_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/read_all_security.php b/tests/Security/read_all_security.php index 9228bb86..81499234 100644 --- a/tests/Security/read_all_security.php +++ b/tests/Security/read_all_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/read_stream_meta_security.php b/tests/Security/read_stream_meta_security.php index 89fc76f4..d6b269d1 100644 --- a/tests/Security/read_stream_meta_security.php +++ b/tests/Security/read_stream_meta_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/read_stream_security.php b/tests/Security/read_stream_security.php index f0803233..a5f3ede4 100644 --- a/tests/Security/read_stream_security.php +++ b/tests/Security/read_stream_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/stream_security_inheritance.php b/tests/Security/stream_security_inheritance.php index ac49cb49..7eae40f1 100644 --- a/tests/Security/stream_security_inheritance.php +++ b/tests/Security/stream_security_inheritance.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/subscribe_to_all_security.php b/tests/Security/subscribe_to_all_security.php index 6dedc3c0..99b84fec 100644 --- a/tests/Security/subscribe_to_all_security.php +++ b/tests/Security/subscribe_to_all_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/subscribe_to_stream_security.php b/tests/Security/subscribe_to_stream_security.php index 846155f4..3ee32ee1 100644 --- a/tests/Security/subscribe_to_stream_security.php +++ b/tests/Security/subscribe_to_stream_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/system_stream_security.php b/tests/Security/system_stream_security.php index 6dc9a564..2cd5f2e0 100644 --- a/tests/Security/system_stream_security.php +++ b/tests/Security/system_stream_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/write_stream_meta_security.php b/tests/Security/write_stream_meta_security.php index a974c1f4..ad81c595 100644 --- a/tests/Security/write_stream_meta_security.php +++ b/tests/Security/write_stream_meta_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/Security/write_stream_security.php b/tests/Security/write_stream_security.php index 990d7ee5..d2f0bf99 100644 --- a/tests/Security/write_stream_security.php +++ b/tests/Security/write_stream_security.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/SpecificationWithConnection.php b/tests/SpecificationWithConnection.php index ca1cf5c3..e2bd0c64 100644 --- a/tests/SpecificationWithConnection.php +++ b/tests/SpecificationWithConnection.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/SpecificationWithLinkToToDeletedEvents.php b/tests/SpecificationWithLinkToToDeletedEvents.php index 2a4a4f8c..92988b4c 100644 --- a/tests/SpecificationWithLinkToToDeletedEvents.php +++ b/tests/SpecificationWithLinkToToDeletedEvents.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/SpecificationWithLinkToToMaxCountDeletedEvents.php b/tests/SpecificationWithLinkToToMaxCountDeletedEvents.php index 68f9f590..4d729218 100644 --- a/tests/SpecificationWithLinkToToMaxCountDeletedEvents.php +++ b/tests/SpecificationWithLinkToToMaxCountDeletedEvents.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/SystemData/clientapi_tcp_package.php b/tests/SystemData/clientapi_tcp_package.php index 98e37e5f..550989e4 100644 --- a/tests/SystemData/clientapi_tcp_package.php +++ b/tests/SystemData/clientapi_tcp_package.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/SystemUsers.php b/tests/SystemUsers.php index 28cc7356..5cdfdc40 100644 --- a/tests/SystemUsers.php +++ b/tests/SystemUsers.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/UserManagement/TestWithNode.php b/tests/UserManagement/TestWithNode.php index 39795310..8f77f301 100644 --- a/tests/UserManagement/TestWithNode.php +++ b/tests/UserManagement/TestWithNode.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/UserManagement/TestWithUser.php b/tests/UserManagement/TestWithUser.php index 59319f95..6df7a14c 100644 --- a/tests/UserManagement/TestWithUser.php +++ b/tests/UserManagement/TestWithUser.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/UserManagement/change_password.php b/tests/UserManagement/change_password.php index f5eb0145..6db2e17d 100644 --- a/tests/UserManagement/change_password.php +++ b/tests/UserManagement/change_password.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/UserManagement/creating_a_user.php b/tests/UserManagement/creating_a_user.php index e6f8b192..d3ba7c54 100644 --- a/tests/UserManagement/creating_a_user.php +++ b/tests/UserManagement/creating_a_user.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/UserManagement/deleting_a_user.php b/tests/UserManagement/deleting_a_user.php index 33f141d5..e36cde11 100644 --- a/tests/UserManagement/deleting_a_user.php +++ b/tests/UserManagement/deleting_a_user.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/UserManagement/enable_disable_user.php b/tests/UserManagement/enable_disable_user.php index c3cc17ac..de673da2 100644 --- a/tests/UserManagement/enable_disable_user.php +++ b/tests/UserManagement/enable_disable_user.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/UserManagement/get_current_user.php b/tests/UserManagement/get_current_user.php index da632ab4..19761c31 100644 --- a/tests/UserManagement/get_current_user.php +++ b/tests/UserManagement/get_current_user.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/UserManagement/list_users.php b/tests/UserManagement/list_users.php index 390ccdc1..a2e0a864 100644 --- a/tests/UserManagement/list_users.php +++ b/tests/UserManagement/list_users.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/UserManagement/reset_password.php b/tests/UserManagement/reset_password.php index 73c8e6a7..4c6f6340 100644 --- a/tests/UserManagement/reset_password.php +++ b/tests/UserManagement/reset_password.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/UserManagement/updating_a_user.php b/tests/UserManagement/updating_a_user.php index 6d297868..59a72ce2 100644 --- a/tests/UserManagement/updating_a_user.php +++ b/tests/UserManagement/updating_a_user.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 70535b0c..2477e774 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/append_to_stream.php b/tests/append_to_stream.php index 2adeee3c..3dd1e594 100644 --- a/tests/append_to_stream.php +++ b/tests/append_to_stream.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/appending_to_implicitly_created_stream.php b/tests/appending_to_implicitly_created_stream.php index 945ad6d8..a8a5cb38 100644 --- a/tests/appending_to_implicitly_created_stream.php +++ b/tests/appending_to_implicitly_created_stream.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/appending_to_implicitly_created_stream_using_transaction.php b/tests/appending_to_implicitly_created_stream_using_transaction.php index 0627e42b..ae30083c 100644 --- a/tests/appending_to_implicitly_created_stream_using_transaction.php +++ b/tests/appending_to_implicitly_created_stream_using_transaction.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/can_create_duplicate_persistent_subscription_group_name_on_different_streams.php b/tests/can_create_duplicate_persistent_subscription_group_name_on_different_streams.php index 2f27537f..72158975 100644 --- a/tests/can_create_duplicate_persistent_subscription_group_name_on_different_streams.php +++ b/tests/can_create_duplicate_persistent_subscription_group_name_on_different_streams.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/catch_up_subscription_handles_errors.php b/tests/catch_up_subscription_handles_errors.php index 228ed362..f35a31fd 100644 --- a/tests/catch_up_subscription_handles_errors.php +++ b/tests/catch_up_subscription_handles_errors.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,9 @@ use Amp\CancelledException; use Amp\DeferredFuture; + use function Amp\delay; + use Amp\PHPUnit\AsyncTestCase; use Amp\TimeoutCancellation; use Exception; diff --git a/tests/catch_up_subscription_handles_small_batch_sizes.php b/tests/catch_up_subscription_handles_small_batch_sizes.php index decc6fc2..7c0c0add 100644 --- a/tests/catch_up_subscription_handles_small_batch_sizes.php +++ b/tests/catch_up_subscription_handles_small_batch_sizes.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/connect.php b/tests/connect.php index c9e7d22f..ac2d493d 100644 --- a/tests/connect.php +++ b/tests/connect.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -13,19 +13,10 @@ namespace ProophTest\EventStoreClient; -use Amp\CancelledException; -use Amp\DeferredFuture; -use function Amp\delay; use Amp\PHPUnit\AsyncTestCase; -use Amp\TimeoutCancellation; -use Prooph\EventStore\ClientClosedEventArgs; +use Amp\Socket\ConnectException; use Prooph\EventStore\EndPoint; -use Prooph\EventStore\EventStoreConnection; -use Prooph\EventStore\Exception\InvalidOperationException; -use Prooph\EventStore\ExpectedVersion; -use Prooph\EventStoreClient\ConnectionSettings; use Prooph\EventStoreClient\EventStoreConnectionFactory; -use ProophTest\EventStoreClient\Helper\TestEvent; class connect extends AsyncTestCase { @@ -40,85 +31,16 @@ protected function setUp(): void /** * @test - * @doesNotPerformAssertions + * @group ignore */ - public function should_not_throw_exception_when_server_is_down(): void + public function should_throw_exception_when_server_is_down(): void { - $connection = EventStoreConnectionFactory::createFromEndPoint( - $this->blackhole - ); - - $connection->connect(); - - delay(0.05); // wait for loop to finish - } - - /** @test */ - public function should_throw_exception_when_trying_to_reopen_closed_connection(): void - { - $closed = new DeferredFuture(); - $settings = ConnectionSettings::create() - ->limitReconnectionsTo(0) - ->withConnectionTimeoutOf(10) - ->setReconnectionDelayTo(0) - ->failOnNoServerResponse() - ->build(); - - $connection = EventStoreConnectionFactory::createFromEndPoint( - $this->blackhole, - $settings - ); - - $connection->onClosed(function () use ($closed): void { - $closed->complete(true); - }); - - $connection->connect(); - - try { - $closed->getFuture()->await(new TimeoutCancellation(120)); - } catch (CancelledException $e) { - $this->fail('Connection timeout took too long'); - } - - $this->expectException(InvalidOperationException::class); - - $connection->connect(); - } - - /** @test */ - public function should_close_connection_after_configured_amount_of_failed_reconnections(): void - { - $closed = new DeferredFuture(); - $settings = ConnectionSettings::create() - ->limitReconnectionsTo(1) - ->withConnectionTimeoutOf(10) - ->setReconnectionDelayTo(0) - ->failOnNoServerResponse() - ->build(); + $this->expectException(ConnectException::class); $connection = EventStoreConnectionFactory::createFromEndPoint( - $this->blackhole, - $settings + $this->blackhole ); - $connection->onClosed(function (ClientClosedEventArgs $args) use ($closed): void { - $this->assertInstanceOf(EventStoreConnection::class, $args->connection()); - $this->assertSame('Reconnection limit reached', $args->reason()); - - $closed->complete(true); - }); - $connection->connect(); - - try { - $closed->getFuture()->await(new TimeoutCancellation(50)); - } catch (CancelledException $e) { - $this->fail('Connection timeout took too long'); - } - - $this->expectException(InvalidOperationException::class); - - $connection->appendToStream('stream', ExpectedVersion::NoStream, [TestEvent::newTestEvent()]); } } 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 69cfd111..341679f6 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/connect_to_existing_persistent_subscription_with_permissions.php b/tests/connect_to_existing_persistent_subscription_with_permissions.php index 4f4ae262..9b744595 100644 --- a/tests/connect_to_existing_persistent_subscription_with_permissions.php +++ b/tests/connect_to_existing_persistent_subscription_with_permissions.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 6a631c00..98768671 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 75e9c000..aa3568c5 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 992bba12..78ea81ec 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -102,6 +102,8 @@ public function the_subscription_gets_no_events(): void { $this->expectException(CancelledException::class); - $this->resetEvent->getFuture()->await(new TimeoutCancellation(1)); + $this->execute(function () { + $this->resetEvent->getFuture()->await(new TimeoutCancellation(1)); + }); } } 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 80c8a15a..870e5201 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 5fe4c671..b859eccf 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 53c72ec8..53c9eb00 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 d2ecb424..2e5fc6ca 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 2a66466b..1881aaf2 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/connect_to_existing_persistent_subscription_without_permissions.php b/tests/connect_to_existing_persistent_subscription_without_permissions.php index 2ba955b1..126ecdcd 100644 --- a/tests/connect_to_existing_persistent_subscription_without_permissions.php +++ b/tests/connect_to_existing_persistent_subscription_without_permissions.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 a68e95d4..97b37b8f 100644 --- a/tests/connect_to_non_existing_persistent_subscription_with_permissions.php +++ b/tests/connect_to_non_existing_persistent_subscription_with_permissions.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/connect_to_persistent_subscription_with_retries.php b/tests/connect_to_persistent_subscription_with_retries.php index e1307880..1658386a 100644 --- a/tests/connect_to_persistent_subscription_with_retries.php +++ b/tests/connect_to_persistent_subscription_with_retries.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/connection_factory_can.php b/tests/connection_factory_can.php index 28838fea..0dd6275b 100644 --- a/tests/connection_factory_can.php +++ b/tests/connection_factory_can.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/connection_string.php b/tests/connection_string.php index 3a3ae23d..83a1bfcd 100644 --- a/tests/connection_string.php +++ b/tests/connection_string.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/create_duplicate_persistent_subscription_group.php b/tests/create_duplicate_persistent_subscription_group.php index 3ef971aa..2574d8e2 100644 --- a/tests/create_duplicate_persistent_subscription_group.php +++ b/tests/create_duplicate_persistent_subscription_group.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/create_persistent_subscription_after_deleting_the_same.php b/tests/create_persistent_subscription_after_deleting_the_same.php index 78aa75ed..4ebc7551 100644 --- a/tests/create_persistent_subscription_after_deleting_the_same.php +++ b/tests/create_persistent_subscription_after_deleting_the_same.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/create_persistent_subscription_group_without_permissions.php b/tests/create_persistent_subscription_group_without_permissions.php index c3b06211..196bc18a 100644 --- a/tests/create_persistent_subscription_group_without_permissions.php +++ b/tests/create_persistent_subscription_group_without_permissions.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/create_persistent_subscription_on_all_stream.php b/tests/create_persistent_subscription_on_all_stream.php index 8ec6c1da..84dd63f2 100644 --- a/tests/create_persistent_subscription_on_all_stream.php +++ b/tests/create_persistent_subscription_on_all_stream.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/create_persistent_subscription_on_existing_stream.php b/tests/create_persistent_subscription_on_existing_stream.php index 5fc80055..7a5640b7 100644 --- a/tests/create_persistent_subscription_on_existing_stream.php +++ b/tests/create_persistent_subscription_on_existing_stream.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/create_persistent_subscription_on_non_existing_stream.php b/tests/create_persistent_subscription_on_non_existing_stream.php index b32c8852..6bb7d231 100644 --- a/tests/create_persistent_subscription_on_non_existing_stream.php +++ b/tests/create_persistent_subscription_on_non_existing_stream.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/create_persistent_subscription_with_dont_timeout.php b/tests/create_persistent_subscription_with_dont_timeout.php index a6177251..a8431a52 100644 --- a/tests/create_persistent_subscription_with_dont_timeout.php +++ b/tests/create_persistent_subscription_with_dont_timeout.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/create_persistent_subscription_with_too_big_checkpoint_after.php b/tests/create_persistent_subscription_with_too_big_checkpoint_after.php index 59fd40d5..e6e6a651 100644 --- a/tests/create_persistent_subscription_with_too_big_checkpoint_after.php +++ b/tests/create_persistent_subscription_with_too_big_checkpoint_after.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/create_persistent_subscription_with_too_big_message_timeout.php b/tests/create_persistent_subscription_with_too_big_message_timeout.php index d85f4c7b..a7e20143 100644 --- a/tests/create_persistent_subscription_with_too_big_message_timeout.php +++ b/tests/create_persistent_subscription_with_too_big_message_timeout.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/deleting_existing_persistent_subscription_group_with_permissions.php b/tests/deleting_existing_persistent_subscription_group_with_permissions.php index 9263950c..080b36b7 100644 --- a/tests/deleting_existing_persistent_subscription_group_with_permissions.php +++ b/tests/deleting_existing_persistent_subscription_group_with_permissions.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/deleting_existing_persistent_subscription_with_subscriber.php b/tests/deleting_existing_persistent_subscription_with_subscriber.php index 7ce9cf89..02ba8273 100644 --- a/tests/deleting_existing_persistent_subscription_with_subscriber.php +++ b/tests/deleting_existing_persistent_subscription_with_subscriber.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/deleting_persistent_subscription_group_that_doesnt_exist.php b/tests/deleting_persistent_subscription_group_that_doesnt_exist.php index ad966a85..14081c39 100644 --- a/tests/deleting_persistent_subscription_group_that_doesnt_exist.php +++ b/tests/deleting_persistent_subscription_group_that_doesnt_exist.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/deleting_persistent_subscription_group_without_permissions.php b/tests/deleting_persistent_subscription_group_without_permissions.php index e33577d0..c0009a00 100644 --- a/tests/deleting_persistent_subscription_group_without_permissions.php +++ b/tests/deleting_persistent_subscription_group_without_permissions.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/deleting_stream.php b/tests/deleting_stream.php index c9eaadd5..733934be 100644 --- a/tests/deleting_stream.php +++ b/tests/deleting_stream.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/event_store_connection_should.php b/tests/event_store_connection_should.php index 4b4c4889..c38cd4e6 100644 --- a/tests/event_store_connection_should.php +++ b/tests/event_store_connection_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 1cd83851..2e81c5c7 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 c70ed8f6..d6bbb69a 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 acd039b9..c65ebf88 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 24fd9184..23c3d008 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 e61e2f8d..e4c6ffe8 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 f94d3477..94f20ec3 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/not_connected_tests.php b/tests/not_connected_tests.php deleted file mode 100644 index 40634a31..00000000 --- a/tests/not_connected_tests.php +++ /dev/null @@ -1,79 +0,0 @@ - - * (c) 2018-2022 Sascha-Oliver Prolic - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace ProophTest\EventStoreClient; - -use Amp\CancelledException; -use Amp\DeferredFuture; -use Amp\PHPUnit\AsyncTestCase; -use Amp\TimeoutCancellation; -use Prooph\EventStore\EndPoint; -use Prooph\EventStoreClient\ConnectionSettingsBuilder; -use Prooph\EventStoreClient\EventStoreConnectionFactory; - -class not_connected_tests extends AsyncTestCase -{ - /** - * @test - * @doesNotPerformAssertions - */ - public function should_timeout_connection_after_configured_amount_time_on_connect(): void - { - $settingsBuilder = (new ConnectionSettingsBuilder()) - ->limitReconnectionsTo(0) - ->setReconnectionDelayTo(0) - ->failOnNoServerResponse() - ->withConnectionTimeoutOf(1); - - $ip = '8.8.8.8'; //NOTE: This relies on Google DNS server being configured to swallow nonsense traffic - $port = 4567; - - $connection = EventStoreConnectionFactory::createFromEndPoint( - new EndPoint($ip, $port), - $settingsBuilder->build(), - 'test-connection' - ); - - $deferred = new DeferredFuture(); - - $connection->onConnected(function (): void { - \var_dump('connected'); - }); - - $connection->onReconnecting(function (): void { - \var_dump('reconnecting'); - }); - - $connection->onDisconnected(function (): void { - \var_dump('disconnected'); - }); - - $connection->onErrorOccurred(function (): void { - \var_dump('error'); - }); - - $connection->onClosed(function () use ($deferred): void { - $deferred->complete(); - }); - - $connection->connect(); - - try { - $deferred->getFuture()->await(new TimeoutCancellation(5)); - } catch (CancelledException $e) { - $this->fail('Connection timeout took too long'); - } - - $connection->close(); - } -} diff --git a/tests/read_all_events_backward_should.php b/tests/read_all_events_backward_should.php index c82195b1..b5e65be6 100644 --- a/tests/read_all_events_backward_should.php +++ b/tests/read_all_events_backward_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_all_events_backward_with_linkto_deleted_event.php b/tests/read_all_events_backward_with_linkto_deleted_event.php index 2efb1ce3..fb49150a 100644 --- a/tests/read_all_events_backward_with_linkto_deleted_event.php +++ b/tests/read_all_events_backward_with_linkto_deleted_event.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_all_events_forward_should.php b/tests/read_all_events_forward_should.php index 95398575..33170ecc 100644 --- a/tests/read_all_events_forward_should.php +++ b/tests/read_all_events_forward_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_all_events_forward_with_hard_deleted_stream_should.php b/tests/read_all_events_forward_with_hard_deleted_stream_should.php index d800724c..8ddf81f3 100644 --- a/tests/read_all_events_forward_with_hard_deleted_stream_should.php +++ b/tests/read_all_events_forward_with_hard_deleted_stream_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_all_events_forward_with_linkto_passed_max_count.php b/tests/read_all_events_forward_with_linkto_passed_max_count.php index 5eac805a..b2d6d302 100644 --- a/tests/read_all_events_forward_with_linkto_passed_max_count.php +++ b/tests/read_all_events_forward_with_linkto_passed_max_count.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_all_events_forward_with_linkto_to_deleted_event.php b/tests/read_all_events_forward_with_linkto_to_deleted_event.php index e7b3b72c..b685c4cf 100644 --- a/tests/read_all_events_forward_with_linkto_to_deleted_event.php +++ b/tests/read_all_events_forward_with_linkto_to_deleted_event.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_all_events_forward_with_soft_deleted_stream_should.php b/tests/read_all_events_forward_with_soft_deleted_stream_should.php index e4640a47..b48405a2 100644 --- a/tests/read_all_events_forward_with_soft_deleted_stream_should.php +++ b/tests/read_all_events_forward_with_soft_deleted_stream_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_event_of_linkto_to_deleted_event.php b/tests/read_event_of_linkto_to_deleted_event.php index 5c58eded..2d842450 100644 --- a/tests/read_event_of_linkto_to_deleted_event.php +++ b/tests/read_event_of_linkto_to_deleted_event.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_event_should.php b/tests/read_event_should.php index 5fbd3ca9..94ff5b24 100644 --- a/tests/read_event_should.php +++ b/tests/read_event_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_event_stream_backward_should.php b/tests/read_event_stream_backward_should.php index f7ea60dc..621ee70f 100644 --- a/tests/read_event_stream_backward_should.php +++ b/tests/read_event_stream_backward_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_event_stream_forward_should.php b/tests/read_event_stream_forward_should.php index 58831d24..6ee86ff9 100644 --- a/tests/read_event_stream_forward_should.php +++ b/tests/read_event_stream_forward_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/read_stream_events_with_unresolved_linkto.php b/tests/read_stream_events_with_unresolved_linkto.php index a9d2abae..168dac46 100644 --- a/tests/read_stream_events_with_unresolved_linkto.php +++ b/tests/read_stream_events_with_unresolved_linkto.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/soft_delete.php b/tests/soft_delete.php index cdbcc316..fa3adf77 100644 --- a/tests/soft_delete.php +++ b/tests/soft_delete.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,6 +14,7 @@ namespace ProophTest\EventStoreClient; use function Amp\delay; + use Prooph\EventStore\EventData; use Prooph\EventStore\Exception\StreamDeleted; use Prooph\EventStore\Exception\WrongExpectedVersion; diff --git a/tests/subscribe_should.php b/tests/subscribe_should.php index 1942e4c0..e17ab7b2 100644 --- a/tests/subscribe_should.php +++ b/tests/subscribe_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/subscribe_to_all_catching_up_should.php b/tests/subscribe_to_all_catching_up_should.php index 455004f2..1ccde2dc 100644 --- a/tests/subscribe_to_all_catching_up_should.php +++ b/tests/subscribe_to_all_catching_up_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,9 @@ use Amp\CancelledException; use Amp\DeferredFuture; + use function Amp\delay; + use Amp\Future; use Amp\TimeoutCancellation; use Exception; diff --git a/tests/subscribe_to_all_should.php b/tests/subscribe_to_all_should.php index 39fb54d2..50527ccf 100644 --- a/tests/subscribe_to_all_should.php +++ b/tests/subscribe_to_all_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/subscribe_to_stream_catching_up_should.php b/tests/subscribe_to_stream_catching_up_should.php index 7ca4feeb..ec910660 100644 --- a/tests/subscribe_to_stream_catching_up_should.php +++ b/tests/subscribe_to_stream_catching_up_should.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,9 @@ use Amp\CancelledException; use Amp\DeferredFuture; + use function Amp\delay; + use Amp\Future; use Amp\TimeoutCancellation; use Closure; diff --git a/tests/transaction.php b/tests/transaction.php index 53b7f1ce..83664b88 100644 --- a/tests/transaction.php +++ b/tests/transaction.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/update_existing_persistent_subscription.php b/tests/update_existing_persistent_subscription.php index 118ba076..bfcd8adc 100644 --- a/tests/update_existing_persistent_subscription.php +++ b/tests/update_existing_persistent_subscription.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/update_existing_persistent_subscription_with_subscribers.php b/tests/update_existing_persistent_subscription_with_subscribers.php index a6a3de4e..dbfa7f9c 100644 --- a/tests/update_existing_persistent_subscription_with_subscribers.php +++ b/tests/update_existing_persistent_subscription_with_subscribers.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/update_existing_persistent_subscription_without_permissions.php b/tests/update_existing_persistent_subscription_without_permissions.php index 1d3ceb3a..67838735 100644 --- a/tests/update_existing_persistent_subscription_without_permissions.php +++ b/tests/update_existing_persistent_subscription_without_permissions.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/update_non_existing_persistent_subscription.php b/tests/update_non_existing_persistent_subscription.php index 770546c4..6f32575d 100644 --- a/tests/update_non_existing_persistent_subscription.php +++ b/tests/update_non_existing_persistent_subscription.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_a_partitioned_projection_is_running.php b/tests/when_a_partitioned_projection_is_running.php index ad8573cb..a12f2767 100644 --- a/tests/when_a_partitioned_projection_is_running.php +++ b/tests/when_a_partitioned_projection_is_running.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_a_projection_is_running.php b/tests/when_a_projection_is_running.php index 9e4f9e31..5314a6a6 100644 --- a/tests/when_a_projection_is_running.php +++ b/tests/when_a_projection_is_running.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_committing_empty_transaction.php b/tests/when_committing_empty_transaction.php index c2c03bad..bd127aed 100644 --- a/tests/when_committing_empty_transaction.php +++ b/tests/when_committing_empty_transaction.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_creating_continuous_projection.php b/tests/when_creating_continuous_projection.php index ba0c8f6f..27b57c07 100644 --- a/tests/when_creating_continuous_projection.php +++ b/tests/when_creating_continuous_projection.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_creating_continuous_projection_with_track_emitted_streams.php b/tests/when_creating_continuous_projection_with_track_emitted_streams.php index e6ec9370..311fcdc5 100644 --- a/tests/when_creating_continuous_projection_with_track_emitted_streams.php +++ b/tests/when_creating_continuous_projection_with_track_emitted_streams.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_creating_one_time_projection.php b/tests/when_creating_one_time_projection.php index ee2df279..b732bb8b 100644 --- a/tests/when_creating_one_time_projection.php +++ b/tests/when_creating_one_time_projection.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_creating_transient_projection.php b/tests/when_creating_transient_projection.php index 6ef85957..dc598956 100644 --- a/tests/when_creating_transient_projection.php +++ b/tests/when_creating_transient_projection.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_disabling_projections.php b/tests/when_disabling_projections.php index bf575552..1d339da4 100644 --- a/tests/when_disabling_projections.php +++ b/tests/when_disabling_projections.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_enabling_projections.php b/tests/when_enabling_projections.php index 602d0777..9e450aec 100644 --- a/tests/when_enabling_projections.php +++ b/tests/when_enabling_projections.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_having_max_count_set_for_stream.php b/tests/when_having_max_count_set_for_stream.php index b7944211..923a37e4 100644 --- a/tests/when_having_max_count_set_for_stream.php +++ b/tests/when_having_max_count_set_for_stream.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_having_truncate_before_set_for_stream.php b/tests/when_having_truncate_before_set_for_stream.php index c3874949..300845b9 100644 --- a/tests/when_having_truncate_before_set_for_stream.php +++ b/tests/when_having_truncate_before_set_for_stream.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_listing_all_projections.php b/tests/when_listing_all_projections.php index 17e86869..6650db29 100644 --- a/tests/when_listing_all_projections.php +++ b/tests/when_listing_all_projections.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_listing_continuous_projections.php b/tests/when_listing_continuous_projections.php index 4b3523d6..681697df 100644 --- a/tests/when_listing_continuous_projections.php +++ b/tests/when_listing_continuous_projections.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_listing_one_time_projections.php b/tests/when_listing_one_time_projections.php index 1996b247..55bda6a2 100644 --- a/tests/when_listing_one_time_projections.php +++ b/tests/when_listing_one_time_projections.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_resetting_projections.php b/tests/when_resetting_projections.php index 71f26bce..f2aa617a 100644 --- a/tests/when_resetting_projections.php +++ b/tests/when_resetting_projections.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,6 +14,7 @@ namespace ProophTest\EventStoreClient; use function Amp\delay; + use Amp\PHPUnit\AsyncTestCase; use Prooph\EventStore\Projections\ProjectionDetails; use Prooph\EventStore\Util\Guid; diff --git a/tests/when_updating_a_projection_query.php b/tests/when_updating_a_projection_query.php index eb163503..4120edf3 100644 --- a/tests/when_updating_a_projection_query.php +++ b/tests/when_updating_a_projection_query.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_working_with_metadata.php b/tests/when_working_with_metadata.php index 639ba508..4ec1930f 100644 --- a/tests/when_working_with_metadata.php +++ b/tests/when_working_with_metadata.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_working_with_raw_stream_metadata.php b/tests/when_working_with_raw_stream_metadata.php index e5b771b0..1aca20e7 100644 --- a/tests/when_working_with_raw_stream_metadata.php +++ b/tests/when_working_with_raw_stream_metadata.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. diff --git a/tests/when_working_with_stream_metadata_as_structured_info.php b/tests/when_working_with_stream_metadata_as_structured_info.php index 915d3c71..95e44831 100644 --- a/tests/when_working_with_stream_metadata_as_structured_info.php +++ b/tests/when_working_with_stream_metadata_as_structured_info.php @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. 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 2b988fc2..f0f788a6 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 @@ -2,8 +2,8 @@ /** * This file is part of `prooph/event-store-client`. - * (c) 2018-2022 Alexander Miertsch - * (c) 2018-2022 Sascha-Oliver Prolic + * (c) 2018-2024 Alexander Miertsch + * (c) 2018-2024 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code.