From d53b8f433abbd4e01acdaddcec48e1c90c1aab8f Mon Sep 17 00:00:00 2001 From: prolic Date: Fri, 21 Feb 2025 16:14:40 -0300 Subject: [PATCH] bump deps, fix php cs --- .php_cs => .php-cs-fixer.php | 0 composer.json | 8 +++---- examples/event/QuickStartSucceeded.php | 4 ++-- examples/quickstart.php | 4 ++-- src/ActionEventEmitterEventStore.php | 15 ++++++++++-- src/Container/InMemoryEventStoreFactory.php | 8 +++---- .../InMemoryProjectionManagerFactory.php | 6 ++--- src/EventStore.php | 4 ++-- src/EventStoreDecorator.php | 4 ++-- src/Exception/ConcurrencyException.php | 4 ++-- src/Exception/ConfigurationException.php | 4 ++-- src/Exception/EventStoreException.php | 4 ++-- src/Exception/ExtensionNotLoadedException.php | 4 ++-- src/Exception/InvalidArgumentException.php | 4 ++-- src/Exception/OutOfRangeException.php | 4 ++-- src/Exception/ProjectionNotFound.php | 4 ++-- src/Exception/RuntimeException.php | 4 ++-- src/Exception/StreamExistsAlready.php | 4 ++-- src/Exception/StreamNotFound.php | 4 ++-- src/Exception/TransactionAlreadyStarted.php | 4 ++-- src/Exception/TransactionNotStarted.php | 4 ++-- src/InMemoryEventStore.php | 24 +++++++++++++++---- src/Metadata/FieldType.php | 5 ++-- src/Metadata/MetadataEnricher.php | 4 ++-- src/Metadata/MetadataEnricherAggregate.php | 4 ++-- src/Metadata/MetadataEnricherPlugin.php | 4 ++-- src/Metadata/MetadataMatcher.php | 4 ++-- src/Metadata/Operator.php | 12 ++++++++-- src/NonTransactionalInMemoryEventStore.php | 23 ++++++++++++++---- src/Plugin/AbstractPlugin.php | 4 ++-- src/Plugin/Plugin.php | 4 ++-- src/Plugin/UpcastingPlugin.php | 4 ++-- src/Projection/AbstractReadModel.php | 4 ++-- .../InMemoryEventStoreProjector.php | 9 +++---- src/Projection/InMemoryEventStoreQuery.php | 11 +++++---- .../InMemoryEventStoreReadModelProjector.php | 11 +++++---- src/Projection/InMemoryProjectionManager.php | 4 ++-- src/Projection/ProjectionManager.php | 4 ++-- src/Projection/ProjectionStatus.php | 9 +++++-- src/Projection/Projector.php | 14 +++++++++-- src/Projection/Query.php | 4 ++-- src/Projection/ReadModel.php | 4 ++-- src/Projection/ReadModelProjector.php | 14 +++++++++-- src/ReadOnlyEventStore.php | 4 ++-- src/ReadOnlyEventStoreWrapper.php | 4 ++-- src/Stream.php | 4 ++-- src/StreamIterator/EmptyStreamIterator.php | 4 ++-- src/StreamIterator/InMemoryStreamIterator.php | 4 ++-- src/StreamIterator/MergedStreamIterator.php | 4 ++-- src/StreamIterator/StreamIterator.php | 4 ++-- src/StreamIterator/TimSort.php | 6 ++--- src/StreamName.php | 4 ++-- ...nsactionalActionEventEmitterEventStore.php | 6 +++-- src/TransactionalEventStore.php | 4 ++-- src/Upcasting/NoOpEventUpcaster.php | 4 ++-- src/Upcasting/SingleEventUpcaster.php | 4 ++-- src/Upcasting/Upcaster.php | 4 ++-- src/Upcasting/UpcasterChain.php | 4 ++-- src/Upcasting/UpcastingIterator.php | 4 ++-- src/Util/ArrayCache.php | 4 ++-- src/Util/Assertion.php | 4 ++-- tests/AbstractEventStoreTest.php | 8 +++---- tests/ActionEventEmitterEventStoreTest.php | 8 +++---- .../ActionEventEmitterEventStoreTestCase.php | 4 ++-- .../InMemoryEventStoreFactoryTest.php | 6 ++--- .../InMemoryProjectionManagerFactoryTest.php | 4 ++-- tests/EventStoreTestStreamTrait.php | 4 ++-- tests/Example/QuickStartTest.php | 4 ++-- tests/InMemoryEventStoreTest.php | 4 ++-- .../MetadataEnricherAggregateTest.php | 4 ++-- tests/Metadata/MetadataEnricherPluginTest.php | 4 ++-- tests/Metadata/MetadataMatcherTest.php | 4 ++-- tests/Mock/EventLoggerPlugin.php | 4 ++-- tests/Mock/Post.php | 4 ++-- tests/Mock/PostCreated.php | 4 ++-- tests/Mock/Product.php | 4 ++-- tests/Mock/ReadModelMock.php | 4 ++-- tests/Mock/TestDomainEvent.php | 4 ++-- tests/Mock/TestIteratorAggregate.php | 4 ++-- tests/Mock/User.php | 4 ++-- tests/Mock/UserCreated.php | 4 ++-- tests/Mock/UsernameChanged.php | 4 ++-- ...NonTransactionalInMemoryEventStoreTest.php | 4 ++-- tests/Plugin/PluginManagerTest.php | 4 ++-- tests/Plugin/UpcastingPluginTest.php | 4 ++-- .../AbstractEventStoreProjectorTest.php | 9 +++++-- .../AbstractEventStoreQueryTest.php | 4 ++-- ...stractEventStoreReadModelProjectorTest.php | 9 +++++-- .../AbstractProjectionManagerTest.php | 4 ++-- .../InMemoryEventStoreProjectorTest.php | 4 ++-- .../InMemoryEventStoreQueryTest.php | 4 ++-- ...MemoryEventStoreReadModelProjectorTest.php | 4 ++-- .../InMemoryProjectionManagerTest.php | 4 ++-- .../isolated-long-running-projection.php | 4 ++-- .../isolated-long-running-query.php | 4 ++-- ...ted-long-running-read-model-projection.php | 4 ++-- tests/Projection/isolated-projection.php | 4 ++-- .../isolated-read-model-projection.php | 4 ++-- tests/ReadOnlyEventStoreWrapperTest.php | 4 ++-- .../AbstractStreamIteratorTest.php | 4 ++-- .../EmptyStreamIteratorTest.php | 4 ++-- .../InMemoryStreamIteratorTest.php | 4 ++-- .../MergedStreamIteratorTest.php | 4 ++-- tests/StreamNameTest.php | 4 ++-- ...tionalActionEventEmitterEventStoreTest.php | 8 +++---- tests/TransactionalEventStoreTestTrait.php | 5 ++-- tests/Upcasting/NoOpEventUpcasterTest.php | 4 ++-- tests/Upcasting/SingleEventUpcasterTest.php | 4 ++-- tests/Upcasting/UpcasterChainTest.php | 4 ++-- tests/Upcasting/UpcastingIteratorTest.php | 4 ++-- tests/Util/ArrayCacheTest.php | 4 ++-- 111 files changed, 336 insertions(+), 246 deletions(-) rename .php_cs => .php-cs-fixer.php (100%) diff --git a/.php_cs b/.php-cs-fixer.php similarity index 100% rename from .php_cs rename to .php-cs-fixer.php diff --git a/composer.json b/composer.json index 22086f95..c867478f 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "^7.4 || ^8.0", + "php": "^8.2", "marc-mabe/php-enum": "^4.4", "prooph/common": "^4.5.2" }, @@ -32,12 +32,12 @@ "phpspec/prophecy": "^1.10.3", "phpspec/prophecy-phpunit": "^2.0", "phpunit/php-invoker": "^3.1", - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^9.6 || ^10.0", "prooph/bookdown-template": "^0.2.3", - "prooph/php-cs-fixer-config": "^0.4", + "prooph/php-cs-fixer-config": "^0.6", "psr/container": "^1.0", "sandrokeil/interop-config": "^2.0.1", - "satooshi/php-coveralls": "^1.0" + "php-coveralls/php-coveralls": "^2.7" }, "suggest": { "prooph/pdo-event-store": "For usage with MySQL or Postgres as event store", diff --git a/examples/event/QuickStartSucceeded.php b/examples/event/QuickStartSucceeded.php index 23e005d3..b3409182 100644 --- a/examples/event/QuickStartSucceeded.php +++ b/examples/event/QuickStartSucceeded.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/quickstart.php b/examples/quickstart.php index d7b23c02..c56190cb 100644 --- a/examples/quickstart.php +++ b/examples/quickstart.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/ActionEventEmitterEventStore.php b/src/ActionEventEmitterEventStore.php index 5329f5ec..c3979034 100644 --- a/src/ActionEventEmitterEventStore.php +++ b/src/ActionEventEmitterEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -26,16 +26,27 @@ class ActionEventEmitterEventStore implements EventStoreDecorator { public const EVENT_APPEND_TO = 'appendTo'; + public const EVENT_CREATE = 'create'; + public const EVENT_LOAD = 'load'; + public const EVENT_LOAD_REVERSE = 'loadReverse'; + public const EVENT_DELETE = 'delete'; + public const EVENT_HAS_STREAM = 'hasStream'; + public const EVENT_FETCH_STREAM_METADATA = 'fetchStreamMetadata'; + public const EVENT_UPDATE_STREAM_METADATA = 'updateStreamMetadata'; + public const EVENT_FETCH_STREAM_NAMES = 'fetchStreamNames'; + public const EVENT_FETCH_STREAM_NAMES_REGEX = 'fetchStreamNamesRegex'; + public const EVENT_FETCH_CATEGORY_NAMES = 'fetchCategoryNames'; + public const EVENT_FETCH_CATEGORY_NAMES_REGEX = 'fetchCategoryNamesRegex'; public const ALL_EVENTS = [ diff --git a/src/Container/InMemoryEventStoreFactory.php b/src/Container/InMemoryEventStoreFactory.php index 7f973a87..6655ef3c 100644 --- a/src/Container/InMemoryEventStoreFactory.php +++ b/src/Container/InMemoryEventStoreFactory.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -149,7 +149,7 @@ public function __invoke(ContainerInterface $container): ReadOnlyEventStore } /** - * {@inheritdoc} + * @inheritdoc */ public function dimensions(): iterable { @@ -157,7 +157,7 @@ public function dimensions(): iterable } /** - * {@inheritdoc} + * @inheritdoc * @return array{metadata_enrichers: never[], plugins: never[], wrap_action_event_emitter: true, transactional: true, read_only: true} */ public function defaultOptions(): iterable diff --git a/src/Container/InMemoryProjectionManagerFactory.php b/src/Container/InMemoryProjectionManagerFactory.php index ceaf078b..e25ca935 100644 --- a/src/Container/InMemoryProjectionManagerFactory.php +++ b/src/Container/InMemoryProjectionManagerFactory.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -76,7 +76,7 @@ public function __invoke(ContainerInterface $container): InMemoryProjectionManag } /** - * {@inheritdoc} + * @inheritdoc */ public function dimensions(): iterable { diff --git a/src/EventStore.php b/src/EventStore.php index 9568d943..fc2f158d 100644 --- a/src/EventStore.php +++ b/src/EventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/EventStoreDecorator.php b/src/EventStoreDecorator.php index ac3c1583..a1e2e358 100644 --- a/src/EventStoreDecorator.php +++ b/src/EventStoreDecorator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/ConcurrencyException.php b/src/Exception/ConcurrencyException.php index f02d73cf..500d9b15 100644 --- a/src/Exception/ConcurrencyException.php +++ b/src/Exception/ConcurrencyException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/ConfigurationException.php b/src/Exception/ConfigurationException.php index 80c111ae..407caf76 100644 --- a/src/Exception/ConfigurationException.php +++ b/src/Exception/ConfigurationException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/EventStoreException.php b/src/Exception/EventStoreException.php index 8729043e..06c18bbb 100644 --- a/src/Exception/EventStoreException.php +++ b/src/Exception/EventStoreException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/ExtensionNotLoadedException.php b/src/Exception/ExtensionNotLoadedException.php index eb3d0c40..281d0033 100644 --- a/src/Exception/ExtensionNotLoadedException.php +++ b/src/Exception/ExtensionNotLoadedException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index c4d53870..b14d0c35 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/OutOfRangeException.php b/src/Exception/OutOfRangeException.php index f87713e9..b6d68327 100644 --- a/src/Exception/OutOfRangeException.php +++ b/src/Exception/OutOfRangeException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/ProjectionNotFound.php b/src/Exception/ProjectionNotFound.php index 78223b6c..b300c88b 100644 --- a/src/Exception/ProjectionNotFound.php +++ b/src/Exception/ProjectionNotFound.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/RuntimeException.php b/src/Exception/RuntimeException.php index 6ec59998..d3b0c49d 100644 --- a/src/Exception/RuntimeException.php +++ b/src/Exception/RuntimeException.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamExistsAlready.php b/src/Exception/StreamExistsAlready.php index 53143495..5cc70c46 100644 --- a/src/Exception/StreamExistsAlready.php +++ b/src/Exception/StreamExistsAlready.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamNotFound.php b/src/Exception/StreamNotFound.php index bd421b22..3306f94c 100644 --- a/src/Exception/StreamNotFound.php +++ b/src/Exception/StreamNotFound.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/TransactionAlreadyStarted.php b/src/Exception/TransactionAlreadyStarted.php index 70417a79..dc59b8d7 100644 --- a/src/Exception/TransactionAlreadyStarted.php +++ b/src/Exception/TransactionAlreadyStarted.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/TransactionNotStarted.php b/src/Exception/TransactionNotStarted.php index 6be0337c..ffef8b28 100644 --- a/src/Exception/TransactionNotStarted.php +++ b/src/Exception/TransactionNotStarted.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/InMemoryEventStore.php b/src/InMemoryEventStore.php index 841bfadd..2749cf9c 100644 --- a/src/InMemoryEventStore.php +++ b/src/InMemoryEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -100,7 +100,7 @@ public function load( $streamEvents = []; foreach ($this->streams[$streamName->toString()]['events'] as $key => $streamEvent) { - /* @var Message $streamEvent */ + // @var Message $streamEvent if (($key + 1) >= $fromNumber && $this->matchesMetadata($metadataMatcher, $streamEvent->metadata()) && $this->matchesMessagesProperty($metadataMatcher, $streamEvent) @@ -146,7 +146,7 @@ public function loadReverse( $streamEvents = []; foreach (\array_reverse($this->streams[$streamName->toString()]['events'], true) as $key => $streamEvent) { - /* @var Message $streamEvent */ + // @var Message $streamEvent if (($key + 1) <= $fromNumber && $this->matchesMetadata($metadataMatcher, $streamEvent->metadata()) && $this->matchesMessagesProperty($metadataMatcher, $streamEvent) @@ -259,6 +259,7 @@ public function transactional(callable $callable) $this->commit(); } catch (\Throwable $e) { $this->rollback(); + throw $e; } @@ -294,6 +295,7 @@ public function fetchStreamNames( if (null === $filter || $filter === $streamName) { if ($offset > $skipped) { ++$skipped; + continue; } @@ -380,6 +382,7 @@ function (array $result, string $streamName): array { if (null === $filter || $filter === $category) { if ($offset > $skipped) { ++$skipped; + continue; } @@ -427,6 +430,7 @@ function (array $result, string $streamName): array { if ($offset > $skipped) { ++$skipped; + continue; } @@ -472,15 +476,18 @@ private function matchesMessagesProperty(MetadataMatcher $metadataMatcher, Messa switch ($match['field']) { case 'uuid': $value = $message->uuid()->toString(); + break; case 'event_name': case 'message_name': case 'messageName': $value = $message->messageName(); + break; case 'created_at': case 'createdAt': $value = $message->createdAt()->format('Y-m-d\TH:i:s.u'); + break; default: throw new \UnexpectedValueException(\sprintf('Unexpected field "%s" given', $match['field'])); @@ -501,46 +508,55 @@ private function match(Operator $operator, $value, $expected): bool if ($value !== $expected) { return false; } + break; case Operator::GREATER_THAN(): if ($value <= $expected) { return false; } + break; case Operator::GREATER_THAN_EQUALS(): if ($value < $expected) { return false; } + break; case Operator::IN(): if (! \in_array($value, $expected, true)) { return false; } + break; case Operator::LOWER_THAN(): if ($value >= $expected) { return false; } + break; case Operator::LOWER_THAN_EQUALS(): if ($value > $expected) { return false; } + break; case Operator::NOT_EQUALS(): if ($value === $expected) { return false; } + break; case Operator::NOT_IN(): if (\in_array($value, $expected, true)) { return false; } + break; case Operator::REGEX(): if (! \preg_match('/' . $expected . '/', $value)) { return false; } + break; default: throw new \UnexpectedValueException('Unknown operator found'); diff --git a/src/Metadata/FieldType.php b/src/Metadata/FieldType.php index f06e0eca..d55214e0 100644 --- a/src/Metadata/FieldType.php +++ b/src/Metadata/FieldType.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -22,5 +22,6 @@ final class FieldType extends Enum { public const METADATA = 0; + public const MESSAGE_PROPERTY = 1; } diff --git a/src/Metadata/MetadataEnricher.php b/src/Metadata/MetadataEnricher.php index 135a3172..18cb9bda 100644 --- a/src/Metadata/MetadataEnricher.php +++ b/src/Metadata/MetadataEnricher.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Metadata/MetadataEnricherAggregate.php b/src/Metadata/MetadataEnricherAggregate.php index 8bb3fe78..11b48c6f 100644 --- a/src/Metadata/MetadataEnricherAggregate.php +++ b/src/Metadata/MetadataEnricherAggregate.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Metadata/MetadataEnricherPlugin.php b/src/Metadata/MetadataEnricherPlugin.php index a0f66223..4b3b8221 100644 --- a/src/Metadata/MetadataEnricherPlugin.php +++ b/src/Metadata/MetadataEnricherPlugin.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Metadata/MetadataMatcher.php b/src/Metadata/MetadataMatcher.php index 8621640d..f48df958 100644 --- a/src/Metadata/MetadataMatcher.php +++ b/src/Metadata/MetadataMatcher.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Metadata/Operator.php b/src/Metadata/Operator.php index ce1df4f6..6fdeb5d1 100644 --- a/src/Metadata/Operator.php +++ b/src/Metadata/Operator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,12 +29,20 @@ class Operator extends Enum { public const EQUALS = '='; + public const GREATER_THAN = '>'; + public const GREATER_THAN_EQUALS = '>='; + public const IN = 'in'; + public const LOWER_THAN = '<'; + public const LOWER_THAN_EQUALS = '<='; + public const NOT_EQUALS = '!='; + public const NOT_IN = 'nin'; + public const REGEX = 'regex'; } diff --git a/src/NonTransactionalInMemoryEventStore.php b/src/NonTransactionalInMemoryEventStore.php index 1183cd9c..78aa8269 100644 --- a/src/NonTransactionalInMemoryEventStore.php +++ b/src/NonTransactionalInMemoryEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -83,7 +83,7 @@ public function load( $streamEvents = []; foreach ($this->streams[$streamName->toString()]['events'] as $key => $streamEvent) { - /* @var Message $streamEvent */ + // @var Message $streamEvent if ( ($key + 1) >= $fromNumber && $this->matchesMetadata($metadataMatcher, $streamEvent->metadata()) @@ -130,7 +130,7 @@ public function loadReverse( $streamEvents = []; foreach (\array_reverse($this->streams[$streamName->toString()]['events'], true) as $key => $streamEvent) { - /* @var Message $streamEvent */ + // @var Message $streamEvent if ( ($key + 1) <= $fromNumber && $this->matchesMetadata($metadataMatcher, $streamEvent->metadata()) @@ -216,6 +216,7 @@ public function fetchStreamNames( if (null === $filter || $filter === $streamName) { if ($offset > $skipped) { ++$skipped; + continue; } @@ -303,6 +304,7 @@ function (array $result, string $streamName): array { if (null === $filter || $filter === $category) { if ($offset > $skipped) { ++$skipped; + continue; } @@ -352,6 +354,7 @@ function (array $result, string $streamName): array { if ($offset > $skipped) { ++$skipped; + continue; } @@ -397,15 +400,18 @@ private function matchesMessagesProperty(MetadataMatcher $metadataMatcher, Messa switch ($match['field']) { case 'uuid': $value = $message->uuid()->toString(); + break; case 'event_name': case 'message_name': case 'messageName': $value = $message->messageName(); + break; case 'created_at': case 'createdAt': $value = $message->createdAt()->format('Y-m-d\TH:i:s.u'); + break; default: throw new \UnexpectedValueException(\sprintf('Unexpected field "%s" given', $match['field'])); @@ -426,46 +432,55 @@ private function match(Operator $operator, $value, $expected): bool if ($value !== $expected) { return false; } + break; case Operator::GREATER_THAN(): if ($value <= $expected) { return false; } + break; case Operator::GREATER_THAN_EQUALS(): if ($value < $expected) { return false; } + break; case Operator::IN(): if (! \in_array($value, $expected, true)) { return false; } + break; case Operator::LOWER_THAN(): if ($value >= $expected) { return false; } + break; case Operator::LOWER_THAN_EQUALS(): if ($value > $expected) { return false; } + break; case Operator::NOT_EQUALS(): if ($value === $expected) { return false; } + break; case Operator::NOT_IN(): if (\in_array($value, $expected, true)) { return false; } + break; case Operator::REGEX(): if (! \preg_match('/' . $expected . '/', $value)) { return false; } + break; default: throw new \UnexpectedValueException('Unknown operator found'); diff --git a/src/Plugin/AbstractPlugin.php b/src/Plugin/AbstractPlugin.php index 5f280d3d..2022c3c6 100644 --- a/src/Plugin/AbstractPlugin.php +++ b/src/Plugin/AbstractPlugin.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Plugin/Plugin.php b/src/Plugin/Plugin.php index 56a798d7..aa7e1dc9 100644 --- a/src/Plugin/Plugin.php +++ b/src/Plugin/Plugin.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Plugin/UpcastingPlugin.php b/src/Plugin/UpcastingPlugin.php index 2d5c195f..288e2a3b 100644 --- a/src/Plugin/UpcastingPlugin.php +++ b/src/Plugin/UpcastingPlugin.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/AbstractReadModel.php b/src/Projection/AbstractReadModel.php index e1755bff..9be93c02 100644 --- a/src/Projection/AbstractReadModel.php +++ b/src/Projection/AbstractReadModel.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/InMemoryEventStoreProjector.php b/src/Projection/InMemoryEventStoreProjector.php index fb29022e..e9ebb630 100644 --- a/src/Projection/InMemoryEventStoreProjector.php +++ b/src/Projection/InMemoryEventStoreProjector.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -349,7 +349,7 @@ private function handleStreamWithSingleHandler(MergedStreamIterator $events): vo { $handler = $this->handler; - /* @var Message $event */ + // @var Message $event foreach ($events as $event) { if ($this->triggerPcntlSignalDispatch) { \pcntl_signal_dispatch(); @@ -372,7 +372,7 @@ private function handleStreamWithSingleHandler(MergedStreamIterator $events): vo private function handleStreamWithHandlers(MergedStreamIterator $events): void { - /* @var Message $event */ + // @var Message $event foreach ($events as $event) { if ($this->triggerPcntlSignalDispatch) { \pcntl_signal_dispatch(); @@ -460,6 +460,7 @@ private function prepareStreamPositions(): void foreach ($this->query['categories'] as $category) { if (\substr($stream, 0, \strlen($category) + 1) === $category . '-') { $streamPositions[$stream] = 0; + break; } } diff --git a/src/Projection/InMemoryEventStoreQuery.php b/src/Projection/InMemoryEventStoreQuery.php index 21150ebd..a553ed19 100644 --- a/src/Projection/InMemoryEventStoreQuery.php +++ b/src/Projection/InMemoryEventStoreQuery.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -60,7 +60,7 @@ public function __construct(EventStore $eventStore, bool $triggerPcntlSignalDisp } if ( - ! $eventStore instanceof InMemoryEventStore && ! $eventStore instanceof NonTransactionalInMemoryEventStore + ! $eventStore instanceof InMemoryEventStore && ! $eventStore instanceof NonTransactionalInMemoryEventStore ) { throw new Exception\InvalidArgumentException('Unknown event store instance given'); } @@ -243,7 +243,7 @@ private function handleStreamWithSingleHandler(MergedStreamIterator $events): vo { $handler = $this->handler; - /* @var Message $event */ + // @var Message $event foreach ($events as $event) { if ($this->triggerPcntlSignalDispatch) { \pcntl_signal_dispatch(); @@ -266,7 +266,7 @@ private function handleStreamWithSingleHandler(MergedStreamIterator $events): vo private function handleStreamWithHandlers(MergedStreamIterator $events): void { - /* @var Message $event */ + // @var Message $event foreach ($events as $event) { if ($this->triggerPcntlSignalDispatch) { \pcntl_signal_dispatch(); @@ -344,6 +344,7 @@ private function prepareStreamPositions(): void foreach ($this->query['categories'] as $category) { if (\substr($stream, 0, \strlen($category) + 1) === $category . '-') { $streamPositions[$stream] = 0; + break; } } diff --git a/src/Projection/InMemoryEventStoreReadModelProjector.php b/src/Projection/InMemoryEventStoreReadModelProjector.php index 2f4fc55b..5f3e3f11 100644 --- a/src/Projection/InMemoryEventStoreReadModelProjector.php +++ b/src/Projection/InMemoryEventStoreReadModelProjector.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -104,7 +104,7 @@ public function __construct( } if ( - ! $eventStore instanceof InMemoryEventStore && ! $eventStore instanceof NonTransactionalInMemoryEventStore + ! $eventStore instanceof InMemoryEventStore && ! $eventStore instanceof NonTransactionalInMemoryEventStore ) { throw new Exception\InvalidArgumentException('Unknown event store instance given'); } @@ -329,7 +329,7 @@ private function handleStreamWithSingleHandler(MergedStreamIterator $events): vo { $handler = $this->handler; - /* @var Message $event */ + // @var Message $event foreach ($events as $event) { if ($this->triggerPcntlSignalDispatch) { \pcntl_signal_dispatch(); @@ -358,7 +358,7 @@ private function handleStreamWithSingleHandler(MergedStreamIterator $events): vo private function handleStreamWithHandlers(MergedStreamIterator $events): void { - /* @var Message $event */ + // @var Message $event foreach ($events as $event) { if ($this->triggerPcntlSignalDispatch) { \pcntl_signal_dispatch(); @@ -448,6 +448,7 @@ private function prepareStreamPositions(): void foreach ($this->query['categories'] as $category) { if (\substr($stream, 0, \strlen($category) + 1) === $category . '-') { $streamPositions[$stream] = 0; + break; } } diff --git a/src/Projection/InMemoryProjectionManager.php b/src/Projection/InMemoryProjectionManager.php index cd2fd702..216b79ad 100644 --- a/src/Projection/InMemoryProjectionManager.php +++ b/src/Projection/InMemoryProjectionManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/ProjectionManager.php b/src/Projection/ProjectionManager.php index b923775a..2bdb8ce9 100644 --- a/src/Projection/ProjectionManager.php +++ b/src/Projection/ProjectionManager.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/ProjectionStatus.php b/src/Projection/ProjectionStatus.php index dc479101..1f4ae06b 100644 --- a/src/Projection/ProjectionStatus.php +++ b/src/Projection/ProjectionStatus.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -26,9 +26,14 @@ final class ProjectionStatus extends Enum { public const RUNNING = 'running'; + public const STOPPING = 'stopping'; + public const DELETING = 'deleting'; + public const DELETING_INCL_EMITTED_EVENTS = 'deleting incl emitted events'; + public const RESETTING = 'resetting'; + public const IDLE = 'idle'; } diff --git a/src/Projection/Projector.php b/src/Projection/Projector.php index ea86f8ea..2194a2c9 100644 --- a/src/Projection/Projector.php +++ b/src/Projection/Projector.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -19,17 +19,27 @@ interface Projector { public const OPTION_CACHE_SIZE = 'cache_size'; + public const OPTION_SLEEP = 'sleep'; + public const OPTION_PERSIST_BLOCK_SIZE = 'persist_block_size'; + public const OPTION_LOCK_TIMEOUT_MS = 'lock_timeout_ms'; + public const OPTION_PCNTL_DISPATCH = 'trigger_pcntl_dispatch'; + public const OPTION_UPDATE_LOCK_THRESHOLD = 'update_lock_threshold'; public const DEFAULT_CACHE_SIZE = 1000; + public const DEFAULT_SLEEP = 100000; + public const DEFAULT_PERSIST_BLOCK_SIZE = 1000; + public const DEFAULT_LOCK_TIMEOUT_MS = 1000; + public const DEFAULT_PCNTL_DISPATCH = false; + public const DEFAULT_UPDATE_LOCK_THRESHOLD = 0; /** diff --git a/src/Projection/Query.php b/src/Projection/Query.php index 62d08d98..402ae0e6 100644 --- a/src/Projection/Query.php +++ b/src/Projection/Query.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/ReadModel.php b/src/Projection/ReadModel.php index 7ec527fa..dc5e0acf 100644 --- a/src/Projection/ReadModel.php +++ b/src/Projection/ReadModel.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/ReadModelProjector.php b/src/Projection/ReadModelProjector.php index 54524d75..1d459474 100644 --- a/src/Projection/ReadModelProjector.php +++ b/src/Projection/ReadModelProjector.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -18,17 +18,27 @@ interface ReadModelProjector { public const OPTION_CACHE_SIZE = 'cache_size'; + public const OPTION_SLEEP = 'sleep'; + public const OPTION_PERSIST_BLOCK_SIZE = 'persist_block_size'; + public const OPTION_LOCK_TIMEOUT_MS = 'lock_timeout_ms'; + public const OPTION_PCNTL_DISPATCH = 'trigger_pcntl_dispatch'; + public const OPTION_UPDATE_LOCK_THRESHOLD = 'update_lock_threshold'; public const DEFAULT_CACHE_SIZE = 1000; + public const DEFAULT_SLEEP = 100000; + public const DEFAULT_PERSIST_BLOCK_SIZE = 1000; + public const DEFAULT_LOCK_TIMEOUT_MS = 1000; + public const DEFAULT_PCNTL_DISPATCH = false; + public const DEFAULT_UPDATE_LOCK_THRESHOLD = 0; /** diff --git a/src/ReadOnlyEventStore.php b/src/ReadOnlyEventStore.php index bdd03938..e373dbba 100644 --- a/src/ReadOnlyEventStore.php +++ b/src/ReadOnlyEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/ReadOnlyEventStoreWrapper.php b/src/ReadOnlyEventStoreWrapper.php index afa3e9de..ca13fb48 100644 --- a/src/ReadOnlyEventStoreWrapper.php +++ b/src/ReadOnlyEventStoreWrapper.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Stream.php b/src/Stream.php index d8280ad7..be09019f 100644 --- a/src/Stream.php +++ b/src/Stream.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamIterator/EmptyStreamIterator.php b/src/StreamIterator/EmptyStreamIterator.php index 06326a3d..b874bc8a 100644 --- a/src/StreamIterator/EmptyStreamIterator.php +++ b/src/StreamIterator/EmptyStreamIterator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamIterator/InMemoryStreamIterator.php b/src/StreamIterator/InMemoryStreamIterator.php index 0cfe9130..a5660a5d 100644 --- a/src/StreamIterator/InMemoryStreamIterator.php +++ b/src/StreamIterator/InMemoryStreamIterator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamIterator/MergedStreamIterator.php b/src/StreamIterator/MergedStreamIterator.php index 695a9c91..ebcbbcd4 100644 --- a/src/StreamIterator/MergedStreamIterator.php +++ b/src/StreamIterator/MergedStreamIterator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamIterator/StreamIterator.php b/src/StreamIterator/StreamIterator.php index b241ba00..e613e093 100644 --- a/src/StreamIterator/StreamIterator.php +++ b/src/StreamIterator/StreamIterator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamIterator/TimSort.php b/src/StreamIterator/TimSort.php index 790d1007..f1fac5e7 100644 --- a/src/StreamIterator/TimSort.php +++ b/src/StreamIterator/TimSort.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -116,13 +116,11 @@ private function timSort(array &$arr, int $n): void // start merging from size RUN (or 32). It will merge // to form size 64, then 128, 256 and so on .... for ($size = $this->timSortRun; $size < $n; $size = 2 * $size) { - // pick starting point of left sub $array. We // are going to merge $arr[left..left+size-1] // and $arr[left+size, left+2*size-1] // After every merge, we increase left by 2*size for ($left = 0; $left < $n; $left += 2 * $size) { - // find ending point of left sub $array // mid+1 is starting point of right sub $array $mid = $left + $size - 1; diff --git a/src/StreamName.php b/src/StreamName.php index 2b9794d4..4dbc0c87 100644 --- a/src/StreamName.php +++ b/src/StreamName.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/TransactionalActionEventEmitterEventStore.php b/src/TransactionalActionEventEmitterEventStore.php index 50035535..5e6af88b 100644 --- a/src/TransactionalActionEventEmitterEventStore.php +++ b/src/TransactionalActionEventEmitterEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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,9 @@ class TransactionalActionEventEmitterEventStore extends ActionEventEmitterEventStore implements TransactionalEventStore { public const EVENT_BEGIN_TRANSACTION = 'beginTransaction'; + public const EVENT_COMMIT = 'commit'; + public const EVENT_ROLLBACK = 'rollback'; public const ALL_EVENTS = [ diff --git a/src/TransactionalEventStore.php b/src/TransactionalEventStore.php index 9b40b148..6d59543b 100644 --- a/src/TransactionalEventStore.php +++ b/src/TransactionalEventStore.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Upcasting/NoOpEventUpcaster.php b/src/Upcasting/NoOpEventUpcaster.php index e49cb1c6..5aaaf8b2 100644 --- a/src/Upcasting/NoOpEventUpcaster.php +++ b/src/Upcasting/NoOpEventUpcaster.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Upcasting/SingleEventUpcaster.php b/src/Upcasting/SingleEventUpcaster.php index ad034a8f..9337a7cd 100644 --- a/src/Upcasting/SingleEventUpcaster.php +++ b/src/Upcasting/SingleEventUpcaster.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Upcasting/Upcaster.php b/src/Upcasting/Upcaster.php index 27b799c3..b8cb431a 100644 --- a/src/Upcasting/Upcaster.php +++ b/src/Upcasting/Upcaster.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Upcasting/UpcasterChain.php b/src/Upcasting/UpcasterChain.php index dd050686..14d52ed0 100644 --- a/src/Upcasting/UpcasterChain.php +++ b/src/Upcasting/UpcasterChain.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Upcasting/UpcastingIterator.php b/src/Upcasting/UpcastingIterator.php index eb50c6fd..91e07627 100644 --- a/src/Upcasting/UpcastingIterator.php +++ b/src/Upcasting/UpcastingIterator.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Util/ArrayCache.php b/src/Util/ArrayCache.php index 95a89ccb..1546570e 100644 --- a/src/Util/ArrayCache.php +++ b/src/Util/ArrayCache.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Util/Assertion.php b/src/Util/Assertion.php index 016786ca..067ba059 100644 --- a/src/Util/Assertion.php +++ b/src/Util/Assertion.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/AbstractEventStoreTest.php b/tests/AbstractEventStoreTest.php index d3cca08b..e8203b9d 100644 --- a/tests/AbstractEventStoreTest.php +++ b/tests/AbstractEventStoreTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -35,8 +35,8 @@ */ abstract class AbstractEventStoreTest extends TestCase { - use EventStoreTestStreamTrait, - ProphecyTrait; + use EventStoreTestStreamTrait; + use ProphecyTrait; /** * @var EventStore diff --git a/tests/ActionEventEmitterEventStoreTest.php b/tests/ActionEventEmitterEventStoreTest.php index d1a6e87e..7481fa64 100644 --- a/tests/ActionEventEmitterEventStoreTest.php +++ b/tests/ActionEventEmitterEventStoreTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -29,8 +29,8 @@ class ActionEventEmitterEventStoreTest extends ActionEventEmitterEventStoreTestCase { - use EventStoreTestStreamTrait, - ProphecyTrait; + use EventStoreTestStreamTrait; + use ProphecyTrait; /** * @test diff --git a/tests/ActionEventEmitterEventStoreTestCase.php b/tests/ActionEventEmitterEventStoreTestCase.php index 56a4bc5f..f24364cb 100644 --- a/tests/ActionEventEmitterEventStoreTestCase.php +++ b/tests/ActionEventEmitterEventStoreTestCase.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Container/InMemoryEventStoreFactoryTest.php b/tests/Container/InMemoryEventStoreFactoryTest.php index 1e9cacf7..fd477006 100644 --- a/tests/Container/InMemoryEventStoreFactoryTest.php +++ b/tests/Container/InMemoryEventStoreFactoryTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -237,7 +237,7 @@ public function it_injects_metadata_enrichers(): void $stream = new Stream(new StreamName('test'), new \ArrayIterator($events)); - /* @var InMemoryEventStore $eventStore */ + // @var InMemoryEventStore $eventStore $eventStore->create($stream); } diff --git a/tests/Container/InMemoryProjectionManagerFactoryTest.php b/tests/Container/InMemoryProjectionManagerFactoryTest.php index cbae7ecf..fa9faf2b 100644 --- a/tests/Container/InMemoryProjectionManagerFactoryTest.php +++ b/tests/Container/InMemoryProjectionManagerFactoryTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/EventStoreTestStreamTrait.php b/tests/EventStoreTestStreamTrait.php index f2f46360..a945c10b 100644 --- a/tests/EventStoreTestStreamTrait.php +++ b/tests/EventStoreTestStreamTrait.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Example/QuickStartTest.php b/tests/Example/QuickStartTest.php index 84954365..6f495a27 100644 --- a/tests/Example/QuickStartTest.php +++ b/tests/Example/QuickStartTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/InMemoryEventStoreTest.php b/tests/InMemoryEventStoreTest.php index d3face1a..2d1ed8bc 100644 --- a/tests/InMemoryEventStoreTest.php +++ b/tests/InMemoryEventStoreTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Metadata/MetadataEnricherAggregateTest.php b/tests/Metadata/MetadataEnricherAggregateTest.php index 360874d7..4628ded5 100644 --- a/tests/Metadata/MetadataEnricherAggregateTest.php +++ b/tests/Metadata/MetadataEnricherAggregateTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Metadata/MetadataEnricherPluginTest.php b/tests/Metadata/MetadataEnricherPluginTest.php index b86d9aa9..4848c3f3 100644 --- a/tests/Metadata/MetadataEnricherPluginTest.php +++ b/tests/Metadata/MetadataEnricherPluginTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Metadata/MetadataMatcherTest.php b/tests/Metadata/MetadataMatcherTest.php index 6566021e..598c8bb1 100644 --- a/tests/Metadata/MetadataMatcherTest.php +++ b/tests/Metadata/MetadataMatcherTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Mock/EventLoggerPlugin.php b/tests/Mock/EventLoggerPlugin.php index 02e43182..04fc91be 100644 --- a/tests/Mock/EventLoggerPlugin.php +++ b/tests/Mock/EventLoggerPlugin.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Mock/Post.php b/tests/Mock/Post.php index 03587d74..d99ad178 100644 --- a/tests/Mock/Post.php +++ b/tests/Mock/Post.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Mock/PostCreated.php b/tests/Mock/PostCreated.php index 87347df6..d1571dbc 100644 --- a/tests/Mock/PostCreated.php +++ b/tests/Mock/PostCreated.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Mock/Product.php b/tests/Mock/Product.php index 694d729a..21f1172d 100644 --- a/tests/Mock/Product.php +++ b/tests/Mock/Product.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Mock/ReadModelMock.php b/tests/Mock/ReadModelMock.php index 816f5648..4fd1ffcb 100644 --- a/tests/Mock/ReadModelMock.php +++ b/tests/Mock/ReadModelMock.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Mock/TestDomainEvent.php b/tests/Mock/TestDomainEvent.php index bc4f206c..13f5caf8 100644 --- a/tests/Mock/TestDomainEvent.php +++ b/tests/Mock/TestDomainEvent.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Mock/TestIteratorAggregate.php b/tests/Mock/TestIteratorAggregate.php index 8b806011..1a69a258 100644 --- a/tests/Mock/TestIteratorAggregate.php +++ b/tests/Mock/TestIteratorAggregate.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Mock/User.php b/tests/Mock/User.php index 70387808..81ac1172 100644 --- a/tests/Mock/User.php +++ b/tests/Mock/User.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Mock/UserCreated.php b/tests/Mock/UserCreated.php index ab93289f..0943e10b 100644 --- a/tests/Mock/UserCreated.php +++ b/tests/Mock/UserCreated.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Mock/UsernameChanged.php b/tests/Mock/UsernameChanged.php index 00554099..7edd095e 100644 --- a/tests/Mock/UsernameChanged.php +++ b/tests/Mock/UsernameChanged.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/NonTransactionalInMemoryEventStoreTest.php b/tests/NonTransactionalInMemoryEventStoreTest.php index e5327eac..bb2e6148 100644 --- a/tests/NonTransactionalInMemoryEventStoreTest.php +++ b/tests/NonTransactionalInMemoryEventStoreTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Plugin/PluginManagerTest.php b/tests/Plugin/PluginManagerTest.php index c7c46971..7ff54988 100644 --- a/tests/Plugin/PluginManagerTest.php +++ b/tests/Plugin/PluginManagerTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Plugin/UpcastingPluginTest.php b/tests/Plugin/UpcastingPluginTest.php index 77b58113..a87d3c33 100644 --- a/tests/Plugin/UpcastingPluginTest.php +++ b/tests/Plugin/UpcastingPluginTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/AbstractEventStoreProjectorTest.php b/tests/Projection/AbstractEventStoreProjectorTest.php index 0b32ec8c..3e2c1a21 100644 --- a/tests/Projection/AbstractEventStoreProjectorTest.php +++ b/tests/Projection/AbstractEventStoreProjectorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -78,18 +78,23 @@ public function it_persists_after_blocksize_processed_events_for_multiple_handle switch (true) { case $calledTimes < 10: $testCase->assertSame(null, $position, \sprintf("for handled event '%s' the persisted position expectation is '%s'", $calledTimes, 'none')); + break; case $calledTimes < 20: $testCase->assertSame(10, $position, \sprintf("for handled event '%s' the persisted position expectation is '%s'", $calledTimes, 10)); + break; case $calledTimes < 30: $testCase->assertSame(20, $position, \sprintf("for handled event '%s' the persisted position expectation is '%s'", $calledTimes, 20)); + break; case $calledTimes < 40: $testCase->assertSame(30, $position, \sprintf("for handled event '%s' the persisted position expectation is '%s'", $calledTimes, 30)); + break; case $calledTimes < 50: $testCase->assertSame(40, $position, \sprintf("for handled event '%s' the persisted position expectation is '%s'", $calledTimes, 40)); + break; } diff --git a/tests/Projection/AbstractEventStoreQueryTest.php b/tests/Projection/AbstractEventStoreQueryTest.php index 199d8de9..baeaad0f 100644 --- a/tests/Projection/AbstractEventStoreQueryTest.php +++ b/tests/Projection/AbstractEventStoreQueryTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/AbstractEventStoreReadModelProjectorTest.php b/tests/Projection/AbstractEventStoreReadModelProjectorTest.php index a6972bdc..8f0d0328 100644 --- a/tests/Projection/AbstractEventStoreReadModelProjectorTest.php +++ b/tests/Projection/AbstractEventStoreReadModelProjectorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -82,18 +82,23 @@ public function it_persists_after_blocksize_processed_events_for_multiple_handle switch (true) { case $calledTimes < 10: $testCase->assertSame(null, $position, \sprintf("for handled event '%s' the persisted position expectation is '%s'", $calledTimes, 'none')); + break; case $calledTimes < 20: $testCase->assertSame(10, $position, \sprintf("for handled event '%s' the persisted position expectation is '%s'", $calledTimes, 10)); + break; case $calledTimes < 30: $testCase->assertSame(20, $position, \sprintf("for handled event '%s' the persisted position expectation is '%s'", $calledTimes, 20)); + break; case $calledTimes < 40: $testCase->assertSame(30, $position, \sprintf("for handled event '%s' the persisted position expectation is '%s'", $calledTimes, 30)); + break; case $calledTimes < 50: $testCase->assertSame(40, $position, \sprintf("for handled event '%s' the persisted position expectation is '%s'", $calledTimes, 40)); + break; } diff --git a/tests/Projection/AbstractProjectionManagerTest.php b/tests/Projection/AbstractProjectionManagerTest.php index 959898d8..e9c001d3 100644 --- a/tests/Projection/AbstractProjectionManagerTest.php +++ b/tests/Projection/AbstractProjectionManagerTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/InMemoryEventStoreProjectorTest.php b/tests/Projection/InMemoryEventStoreProjectorTest.php index 40e34a2c..36c43caf 100644 --- a/tests/Projection/InMemoryEventStoreProjectorTest.php +++ b/tests/Projection/InMemoryEventStoreProjectorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/InMemoryEventStoreQueryTest.php b/tests/Projection/InMemoryEventStoreQueryTest.php index a4441b73..07d55743 100644 --- a/tests/Projection/InMemoryEventStoreQueryTest.php +++ b/tests/Projection/InMemoryEventStoreQueryTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/InMemoryEventStoreReadModelProjectorTest.php b/tests/Projection/InMemoryEventStoreReadModelProjectorTest.php index 1fe7e238..b51eaa69 100644 --- a/tests/Projection/InMemoryEventStoreReadModelProjectorTest.php +++ b/tests/Projection/InMemoryEventStoreReadModelProjectorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/InMemoryProjectionManagerTest.php b/tests/Projection/InMemoryProjectionManagerTest.php index 6ae1d214..c1eb7d2a 100644 --- a/tests/Projection/InMemoryProjectionManagerTest.php +++ b/tests/Projection/InMemoryProjectionManagerTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/isolated-long-running-projection.php b/tests/Projection/isolated-long-running-projection.php index 0c8c9563..7fd84f2e 100755 --- a/tests/Projection/isolated-long-running-projection.php +++ b/tests/Projection/isolated-long-running-projection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/isolated-long-running-query.php b/tests/Projection/isolated-long-running-query.php index 9dad13c3..507a9a87 100755 --- a/tests/Projection/isolated-long-running-query.php +++ b/tests/Projection/isolated-long-running-query.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/isolated-long-running-read-model-projection.php b/tests/Projection/isolated-long-running-read-model-projection.php index bdfa352d..698b3f89 100755 --- a/tests/Projection/isolated-long-running-read-model-projection.php +++ b/tests/Projection/isolated-long-running-read-model-projection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/isolated-projection.php b/tests/Projection/isolated-projection.php index 6b25b1f3..a45d5073 100755 --- a/tests/Projection/isolated-projection.php +++ b/tests/Projection/isolated-projection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Projection/isolated-read-model-projection.php b/tests/Projection/isolated-read-model-projection.php index c611b43d..5c9856a3 100755 --- a/tests/Projection/isolated-read-model-projection.php +++ b/tests/Projection/isolated-read-model-projection.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/ReadOnlyEventStoreWrapperTest.php b/tests/ReadOnlyEventStoreWrapperTest.php index f46a0992..7dae7517 100644 --- a/tests/ReadOnlyEventStoreWrapperTest.php +++ b/tests/ReadOnlyEventStoreWrapperTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamIterator/AbstractStreamIteratorTest.php b/tests/StreamIterator/AbstractStreamIteratorTest.php index 3d55b6d4..8e72396e 100644 --- a/tests/StreamIterator/AbstractStreamIteratorTest.php +++ b/tests/StreamIterator/AbstractStreamIteratorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamIterator/EmptyStreamIteratorTest.php b/tests/StreamIterator/EmptyStreamIteratorTest.php index 3275ae69..408e4d83 100644 --- a/tests/StreamIterator/EmptyStreamIteratorTest.php +++ b/tests/StreamIterator/EmptyStreamIteratorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamIterator/InMemoryStreamIteratorTest.php b/tests/StreamIterator/InMemoryStreamIteratorTest.php index df96e7d4..fa788d70 100644 --- a/tests/StreamIterator/InMemoryStreamIteratorTest.php +++ b/tests/StreamIterator/InMemoryStreamIteratorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamIterator/MergedStreamIteratorTest.php b/tests/StreamIterator/MergedStreamIteratorTest.php index 29bc41e2..8f764cfd 100644 --- a/tests/StreamIterator/MergedStreamIteratorTest.php +++ b/tests/StreamIterator/MergedStreamIteratorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/StreamNameTest.php b/tests/StreamNameTest.php index 2b55492e..9a4e60d1 100644 --- a/tests/StreamNameTest.php +++ b/tests/StreamNameTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/TransactionalActionEventEmitterEventStoreTest.php b/tests/TransactionalActionEventEmitterEventStoreTest.php index 9867a1a5..faee8008 100644 --- a/tests/TransactionalActionEventEmitterEventStoreTest.php +++ b/tests/TransactionalActionEventEmitterEventStoreTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -25,8 +25,8 @@ class TransactionalActionEventEmitterEventStoreTest extends TestCase { - use EventStoreTestStreamTrait, - ProphecyTrait; + use EventStoreTestStreamTrait; + use ProphecyTrait; /** * @var TransactionalActionEventEmitterEventStore diff --git a/tests/TransactionalEventStoreTestTrait.php b/tests/TransactionalEventStoreTestTrait.php index 6a9d0bd3..062c7daa 100644 --- a/tests/TransactionalEventStoreTestTrait.php +++ b/tests/TransactionalEventStoreTestTrait.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -129,6 +129,7 @@ public function it_should_rollback_and_throw_exception_in_case_of_transaction_fa $this->eventStore->transactional(function (EventStore $es) use ($eventStore): void { $this->assertSame($es, $eventStore); + throw new \Exception('Transaction failed'); }); } diff --git a/tests/Upcasting/NoOpEventUpcasterTest.php b/tests/Upcasting/NoOpEventUpcasterTest.php index a76b2d12..6ae909e3 100644 --- a/tests/Upcasting/NoOpEventUpcasterTest.php +++ b/tests/Upcasting/NoOpEventUpcasterTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Upcasting/SingleEventUpcasterTest.php b/tests/Upcasting/SingleEventUpcasterTest.php index 8a8f4956..02e6d64c 100644 --- a/tests/Upcasting/SingleEventUpcasterTest.php +++ b/tests/Upcasting/SingleEventUpcasterTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Upcasting/UpcasterChainTest.php b/tests/Upcasting/UpcasterChainTest.php index 7b66684a..b99dcb92 100644 --- a/tests/Upcasting/UpcasterChainTest.php +++ b/tests/Upcasting/UpcasterChainTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Upcasting/UpcastingIteratorTest.php b/tests/Upcasting/UpcastingIteratorTest.php index 55593727..3b9df764 100644 --- a/tests/Upcasting/UpcastingIteratorTest.php +++ b/tests/Upcasting/UpcastingIteratorTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 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/Util/ArrayCacheTest.php b/tests/Util/ArrayCacheTest.php index 3d0e0ca7..f72af295 100644 --- a/tests/Util/ArrayCacheTest.php +++ b/tests/Util/ArrayCacheTest.php @@ -2,8 +2,8 @@ /** * This file is part of prooph/event-store. - * (c) 2014-2023 prooph software GmbH - * (c) 2015-2023 Sascha-Oliver Prolic + * (c) 2014-2025 prooph software GmbH + * (c) 2015-2025 Sascha-Oliver Prolic * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code.