diff --git a/deptrac.yaml b/deptrac.yaml index 3adc696c9..5798c3dc6 100644 --- a/deptrac.yaml +++ b/deptrac.yaml @@ -29,6 +29,10 @@ deptrac: collectors: - type: directory value: src/EventBus/.* + - name: Message + collectors: + - type: directory + value: src/Message/.* - name: MetadataAggregate collectors: - type: directory @@ -96,7 +100,7 @@ deptrac: Attribute: Clock: Console: - - EventBus + - Message - MetadataAggregate - MetadataEvent - Pipeline @@ -106,12 +110,13 @@ deptrac: - Subscription Debug: - Attribute - - EventBus + - Message - Repository - Subscription EventBus: - - Aggregate - Attribute + - Message + Message: - MetadataMessage - Serializer Metadata: @@ -132,18 +137,20 @@ deptrac: Pipeline: - Aggregate - EventBus + - Message - Store - Subscription Subscription: - Attribute - Clock + - Message - MetadataSubscriber - - EventBus - Schema - Store Repository: - Aggregate - Clock + - Message - MetadataAggregate - MetadataEvent - EventBus @@ -159,7 +166,7 @@ deptrac: Store: - Aggregate - Attribute + - Message - Metadata - - EventBus - Schema - Serializer diff --git a/docs/pages/event_bus.md b/docs/pages/event_bus.md index db6268e96..3c9627e62 100644 --- a/docs/pages/event_bus.md +++ b/docs/pages/event_bus.md @@ -21,9 +21,9 @@ Each event is packed into a message and dispatched using the event bus. ```php use Patchlevel\EventSourcing\Clock\SystemClock; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; -$clock = SystemClock(); +$clock = new SystemClock(); $message = Message::create(new NameChanged('foo')) ->withAggregateName('profile') ->withAggregateId('bca7576c-536f-4428-b694-7b1f00c714b7') @@ -46,7 +46,7 @@ As already mentioned, you can enrich the `Message` with your own meta informatio message object and is also stored in the database. ```php -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; $message = Message::create(new NameChanged('foo')) // ... @@ -61,8 +61,6 @@ You can also access your custom headers. For this case there is also a method to used internally. ```php -use Patchlevel\EventSourcing\EventBus\Message; - $message->header('application-id'); // app $message->customHeaders(); // ['application-id' => 'app'] ``` @@ -70,8 +68,6 @@ $message->customHeaders(); // ['application-id' => 'app'] If you want *all* the headers you can also retrieve them. ```php -use Patchlevel\EventSourcing\EventBus\Message; - $message->headers(); // results in: [ @@ -177,7 +173,7 @@ This listener is then called for all saved events / messages. ```php use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\EventBus\Listener; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; final class WelcomeSubscriber { @@ -200,7 +196,7 @@ If you want to listen on all events, you can pass `*` or `Subscribe::ALL` instea ```php use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\EventBus\Listener; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; final class WelcomeSubscriber { diff --git a/docs/pages/getting_started.md b/docs/pages/getting_started.md index 62534b15a..9318678d9 100644 --- a/docs/pages/getting_started.md +++ b/docs/pages/getting_started.md @@ -162,7 +162,7 @@ use Patchlevel\EventSourcing\Attribute\Projector; use Patchlevel\EventSourcing\Attribute\Setup; use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Attribute\Teardown; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Subscription\Subscriber\SubscriberUtil; #[Projector('hotel')] @@ -246,7 +246,7 @@ In our example we also want to email the head office as soon as a guest is check ```php use Patchlevel\EventSourcing\Attribute\Processor; use Patchlevel\EventSourcing\Attribute\Subscribe; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; #[Processor('admin_emails')] final class SendCheckInEmailProcessor diff --git a/docs/pages/message_decorator.md b/docs/pages/message_decorator.md index 4bb5ac62d..18bc850fd 100644 --- a/docs/pages/message_decorator.md +++ b/docs/pages/message_decorator.md @@ -68,7 +68,7 @@ You can also use this feature to add your own metadata to your events. For this to add data `withHeader` and to read this data later on `header`. ```php -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Repository\MessageDecorator\MessageDecorator; final class OnSystemRecordedDecorator implements MessageDecorator diff --git a/docs/pages/pipeline.md b/docs/pages/pipeline.md index c7a0e0ff3..bbdcced14 100644 --- a/docs/pages/pipeline.md +++ b/docs/pages/pipeline.md @@ -72,7 +72,7 @@ $source = new StoreSource($store); There is an `InMemorySource` that receives the messages in an array. This source can be used to write pipeline tests. ```php -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Source\InMemorySource; $source = new InMemorySource([ @@ -92,7 +92,7 @@ You can also create your own source class. It has to inherit from `Source`. Here you can, for example, create a migration from another event sourcing system or similar system. ```php -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Source\Source; $source = new class implements Source { @@ -178,7 +178,7 @@ $messages = $target->messages(); You can also define your own target. To do this, you need to implement the `Target` interface. ```php -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; final class OtherStoreTarget implements Target { @@ -366,7 +366,7 @@ Now we have a `ProfileRegistered` and a `ProfileActivated` event, which should replace the `ProfileCreated` event. ```php -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\Middleware; final class SplitProfileCreatedMiddleware implements Middleware diff --git a/docs/pages/subscription.md b/docs/pages/subscription.md index 408b7efdb..3830f2bc1 100644 --- a/docs/pages/subscription.md +++ b/docs/pages/subscription.md @@ -149,7 +149,7 @@ The method name itself doesn't matter. ```php use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Attribute\Subscriber; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; #[Subscriber('do_stuff', RunMode::Once)] final class DoStuffSubscriber diff --git a/src/Console/Command/ShowAggregateCommand.php b/src/Console/Command/ShowAggregateCommand.php index 97d540865..8ed6ceffc 100644 --- a/src/Console/Command/ShowAggregateCommand.php +++ b/src/Console/Command/ShowAggregateCommand.php @@ -6,7 +6,7 @@ use Patchlevel\EventSourcing\Console\InputHelper; use Patchlevel\EventSourcing\Console\OutputStyle; -use Patchlevel\EventSourcing\EventBus\Serializer\HeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\HeadersSerializer; use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootRegistry; use Patchlevel\EventSourcing\Serializer\EventSerializer; use Patchlevel\EventSourcing\Store\Criteria; diff --git a/src/Console/Command/ShowCommand.php b/src/Console/Command/ShowCommand.php index 24ca96aa7..ee0fbdf40 100644 --- a/src/Console/Command/ShowCommand.php +++ b/src/Console/Command/ShowCommand.php @@ -6,7 +6,7 @@ use Patchlevel\EventSourcing\Console\InputHelper; use Patchlevel\EventSourcing\Console\OutputStyle; -use Patchlevel\EventSourcing\EventBus\Serializer\HeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\HeadersSerializer; use Patchlevel\EventSourcing\Serializer\EventSerializer; use Patchlevel\EventSourcing\Store\Store; use Symfony\Component\Console\Attribute\AsCommand; diff --git a/src/Console/Command/WatchCommand.php b/src/Console/Command/WatchCommand.php index 2ad253814..58bba45eb 100644 --- a/src/Console/Command/WatchCommand.php +++ b/src/Console/Command/WatchCommand.php @@ -6,7 +6,7 @@ use Patchlevel\EventSourcing\Console\InputHelper; use Patchlevel\EventSourcing\Console\OutputStyle; -use Patchlevel\EventSourcing\EventBus\Serializer\HeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\HeadersSerializer; use Patchlevel\EventSourcing\Serializer\EventSerializer; use Patchlevel\EventSourcing\Store\Criteria; use Patchlevel\EventSourcing\Store\Store; diff --git a/src/Console/OutputStyle.php b/src/Console/OutputStyle.php index e0e818e69..832fddaa1 100644 --- a/src/Console/OutputStyle.php +++ b/src/Console/OutputStyle.php @@ -4,8 +4,8 @@ namespace Patchlevel\EventSourcing\Console; -use Patchlevel\EventSourcing\EventBus\Message; -use Patchlevel\EventSourcing\EventBus\Serializer\HeadersSerializer; +use Patchlevel\EventSourcing\Message\Message; +use Patchlevel\EventSourcing\Message\Serializer\HeadersSerializer; use Patchlevel\EventSourcing\Serializer\Encoder\Encoder; use Patchlevel\EventSourcing\Serializer\EventSerializer; use Symfony\Component\Console\Style\SymfonyStyle; diff --git a/src/Debug/Trace/TraceDecorator.php b/src/Debug/Trace/TraceDecorator.php index 2b7475d6f..d866bdf0e 100644 --- a/src/Debug/Trace/TraceDecorator.php +++ b/src/Debug/Trace/TraceDecorator.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Debug\Trace; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Repository\MessageDecorator\MessageDecorator; use function array_map; diff --git a/src/Debug/Trace/TraceableSubscriberAccessor.php b/src/Debug/Trace/TraceableSubscriberAccessor.php index 0942b1d73..1dfe42399 100644 --- a/src/Debug/Trace/TraceableSubscriberAccessor.php +++ b/src/Debug/Trace/TraceableSubscriberAccessor.php @@ -5,7 +5,7 @@ namespace Patchlevel\EventSourcing\Debug\Trace; use Closure; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Subscription\RunMode; use Patchlevel\EventSourcing\Subscription\Subscriber\SubscriberAccessor; diff --git a/src/EventBus/Consumer.php b/src/EventBus/Consumer.php index 4d5a6cbd6..e96201eae 100644 --- a/src/EventBus/Consumer.php +++ b/src/EventBus/Consumer.php @@ -4,6 +4,8 @@ namespace Patchlevel\EventSourcing\EventBus; +use Patchlevel\EventSourcing\Message\Message; + interface Consumer { public function consume(Message $message): void; diff --git a/src/EventBus/DefaultConsumer.php b/src/EventBus/DefaultConsumer.php index 36bae63f8..7ceff10c2 100644 --- a/src/EventBus/DefaultConsumer.php +++ b/src/EventBus/DefaultConsumer.php @@ -4,6 +4,7 @@ namespace Patchlevel\EventSourcing\EventBus; +use Patchlevel\EventSourcing\Message\Message; use Psr\Log\LoggerInterface; use function sprintf; diff --git a/src/EventBus/DefaultEventBus.php b/src/EventBus/DefaultEventBus.php index 887cea36e..f5c13b31f 100644 --- a/src/EventBus/DefaultEventBus.php +++ b/src/EventBus/DefaultEventBus.php @@ -4,6 +4,7 @@ namespace Patchlevel\EventSourcing\EventBus; +use Patchlevel\EventSourcing\Message\Message; use Psr\Log\LoggerInterface; use function array_shift; diff --git a/src/EventBus/EventBus.php b/src/EventBus/EventBus.php index 22af33ec3..86c1934e5 100644 --- a/src/EventBus/EventBus.php +++ b/src/EventBus/EventBus.php @@ -4,6 +4,8 @@ namespace Patchlevel\EventSourcing\EventBus; +use Patchlevel\EventSourcing\Message\Message; + interface EventBus { public function dispatch(Message ...$messages): void; diff --git a/src/EventBus/EventBusException.php b/src/EventBus/EventBusException.php deleted file mode 100644 index b811ef610..000000000 --- a/src/EventBus/EventBusException.php +++ /dev/null @@ -1,11 +0,0 @@ - */ diff --git a/src/Store/DoctrineDbalStore.php b/src/Store/DoctrineDbalStore.php index c22c80f14..ab944b9fa 100644 --- a/src/Store/DoctrineDbalStore.php +++ b/src/Store/DoctrineDbalStore.php @@ -12,9 +12,9 @@ use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Types; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; -use Patchlevel\EventSourcing\EventBus\HeaderNotFound; -use Patchlevel\EventSourcing\EventBus\Message; -use Patchlevel\EventSourcing\EventBus\Serializer\HeadersSerializer; +use Patchlevel\EventSourcing\Message\HeaderNotFound; +use Patchlevel\EventSourcing\Message\Message; +use Patchlevel\EventSourcing\Message\Serializer\HeadersSerializer; use Patchlevel\EventSourcing\Schema\DoctrineSchemaConfigurator; use Patchlevel\EventSourcing\Serializer\EventSerializer; diff --git a/src/Store/DoctrineDbalStoreStream.php b/src/Store/DoctrineDbalStoreStream.php index 11a8a385c..eb5e7be85 100644 --- a/src/Store/DoctrineDbalStoreStream.php +++ b/src/Store/DoctrineDbalStoreStream.php @@ -9,8 +9,8 @@ use Generator; use IteratorAggregate; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; -use Patchlevel\EventSourcing\EventBus\Message; -use Patchlevel\EventSourcing\EventBus\Serializer\HeadersSerializer; +use Patchlevel\EventSourcing\Message\Message; +use Patchlevel\EventSourcing\Message\Serializer\HeadersSerializer; use Patchlevel\EventSourcing\Serializer\EventSerializer; use Patchlevel\EventSourcing\Serializer\SerializedEvent; use Traversable; diff --git a/src/Store/Store.php b/src/Store/Store.php index 1297006ef..c8a0af891 100644 --- a/src/Store/Store.php +++ b/src/Store/Store.php @@ -5,7 +5,7 @@ namespace Patchlevel\EventSourcing\Store; use Closure; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; interface Store { diff --git a/src/Store/Stream.php b/src/Store/Stream.php index 7ca0c48d0..3fc268d3d 100644 --- a/src/Store/Stream.php +++ b/src/Store/Stream.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Store; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Traversable; /** @extends Traversable */ diff --git a/src/Subscription/Engine/DefaultSubscriptionEngine.php b/src/Subscription/Engine/DefaultSubscriptionEngine.php index 9c5c663ae..8cb1b160b 100644 --- a/src/Subscription/Engine/DefaultSubscriptionEngine.php +++ b/src/Subscription/Engine/DefaultSubscriptionEngine.php @@ -5,7 +5,7 @@ namespace Patchlevel\EventSourcing\Subscription\Engine; use Closure; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Store\Criteria; use Patchlevel\EventSourcing\Store\Store; use Patchlevel\EventSourcing\Subscription\RetryStrategy\ClockBasedRetryStrategy; diff --git a/src/Subscription/Subscriber/MetadataSubscriberAccessor.php b/src/Subscription/Subscriber/MetadataSubscriberAccessor.php index 4c212021e..c55f6c571 100644 --- a/src/Subscription/Subscriber/MetadataSubscriberAccessor.php +++ b/src/Subscription/Subscriber/MetadataSubscriberAccessor.php @@ -6,7 +6,7 @@ use Closure; use Patchlevel\EventSourcing\Attribute\Subscribe; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Metadata\Subscriber\SubscriberMetadata; use Patchlevel\EventSourcing\Subscription\RunMode; diff --git a/src/Subscription/Subscriber/SubscriberAccessor.php b/src/Subscription/Subscriber/SubscriberAccessor.php index 46be4217a..25af0c1e5 100644 --- a/src/Subscription/Subscriber/SubscriberAccessor.php +++ b/src/Subscription/Subscriber/SubscriberAccessor.php @@ -5,7 +5,7 @@ namespace Patchlevel\EventSourcing\Subscription\Subscriber; use Closure; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Subscription\RunMode; interface SubscriberAccessor diff --git a/tests/Benchmark/BasicImplementation/Processor/SendEmailProcessor.php b/tests/Benchmark/BasicImplementation/Processor/SendEmailProcessor.php index c0cc59ae5..31bc2a107 100644 --- a/tests/Benchmark/BasicImplementation/Processor/SendEmailProcessor.php +++ b/tests/Benchmark/BasicImplementation/Processor/SendEmailProcessor.php @@ -6,7 +6,7 @@ use Patchlevel\EventSourcing\Attribute\Processor; use Patchlevel\EventSourcing\Attribute\Subscribe; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Events\ProfileCreated; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\SendEmailMock; diff --git a/tests/Benchmark/BasicImplementation/Projection/ProfileProjector.php b/tests/Benchmark/BasicImplementation/Projection/ProfileProjector.php index 4b060cb07..3cbf892eb 100644 --- a/tests/Benchmark/BasicImplementation/Projection/ProfileProjector.php +++ b/tests/Benchmark/BasicImplementation/Projection/ProfileProjector.php @@ -10,7 +10,7 @@ use Patchlevel\EventSourcing\Attribute\Setup; use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Attribute\Teardown; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Subscription\Subscriber\SubscriberUtil; use Patchlevel\EventSourcing\Tests\Benchmark\BasicImplementation\Events\NameChanged; use Patchlevel\EventSourcing\Tests\Benchmark\BasicImplementation\Events\ProfileCreated; diff --git a/tests/Benchmark/SimpleSetupBench.php b/tests/Benchmark/SimpleSetupBench.php index edaf2357d..e6a13c7f5 100644 --- a/tests/Benchmark/SimpleSetupBench.php +++ b/tests/Benchmark/SimpleSetupBench.php @@ -7,7 +7,7 @@ use Patchlevel\EventSourcing\Aggregate\AggregateRootId; use Patchlevel\EventSourcing\EventBus\DefaultEventBus; use Patchlevel\EventSourcing\EventBus\EventBus; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Repository\DefaultRepository; use Patchlevel\EventSourcing\Repository\Repository; use Patchlevel\EventSourcing\Schema\DoctrineSchemaDirector; diff --git a/tests/Benchmark/SnapshotsBench.php b/tests/Benchmark/SnapshotsBench.php index 2cfe4e7ca..a8c898b31 100644 --- a/tests/Benchmark/SnapshotsBench.php +++ b/tests/Benchmark/SnapshotsBench.php @@ -7,7 +7,7 @@ use Patchlevel\EventSourcing\Aggregate\AggregateRootId; use Patchlevel\EventSourcing\EventBus\DefaultEventBus; use Patchlevel\EventSourcing\EventBus\EventBus; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Repository\DefaultRepository; use Patchlevel\EventSourcing\Repository\Repository; use Patchlevel\EventSourcing\Schema\DoctrineSchemaDirector; diff --git a/tests/Benchmark/SplitStreamBench.php b/tests/Benchmark/SplitStreamBench.php index cfb8d0532..c0b1ced5f 100644 --- a/tests/Benchmark/SplitStreamBench.php +++ b/tests/Benchmark/SplitStreamBench.php @@ -7,7 +7,7 @@ use Patchlevel\EventSourcing\Aggregate\AggregateRootId; use Patchlevel\EventSourcing\EventBus\DefaultEventBus; use Patchlevel\EventSourcing\EventBus\EventBus; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Metadata\Event\AttributeEventMetadataFactory; use Patchlevel\EventSourcing\Repository\DefaultRepository; use Patchlevel\EventSourcing\Repository\MessageDecorator\SplitStreamDecorator; diff --git a/tests/Benchmark/SubscriptionEngineBench.php b/tests/Benchmark/SubscriptionEngineBench.php index dae8be233..c30a0567d 100644 --- a/tests/Benchmark/SubscriptionEngineBench.php +++ b/tests/Benchmark/SubscriptionEngineBench.php @@ -7,7 +7,7 @@ use Patchlevel\EventSourcing\Aggregate\AggregateRootId; use Patchlevel\EventSourcing\EventBus\DefaultEventBus; use Patchlevel\EventSourcing\EventBus\EventBus; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Repository\DefaultRepository; use Patchlevel\EventSourcing\Repository\Repository; use Patchlevel\EventSourcing\Schema\ChainDoctrineSchemaConfigurator; diff --git a/tests/Benchmark/blackfire.php b/tests/Benchmark/blackfire.php index aa4f0b1f2..aa785c9dc 100644 --- a/tests/Benchmark/blackfire.php +++ b/tests/Benchmark/blackfire.php @@ -5,7 +5,7 @@ use Doctrine\DBAL\Driver\PDO\SQLite\Driver; use Doctrine\DBAL\DriverManager; use Patchlevel\EventSourcing\EventBus\DefaultEventBus; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Repository\DefaultRepository; use Patchlevel\EventSourcing\Schema\DoctrineSchemaDirector; use Patchlevel\EventSourcing\Serializer\DefaultEventSerializer; diff --git a/tests/Integration/BankAccountSplitStream/IntegrationTest.php b/tests/Integration/BankAccountSplitStream/IntegrationTest.php index 8db1b0c30..50a48bc7a 100644 --- a/tests/Integration/BankAccountSplitStream/IntegrationTest.php +++ b/tests/Integration/BankAccountSplitStream/IntegrationTest.php @@ -6,7 +6,7 @@ use Doctrine\DBAL\Connection; use Patchlevel\EventSourcing\EventBus\DefaultEventBus; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootRegistry; use Patchlevel\EventSourcing\Metadata\Event\AttributeEventMetadataFactory; use Patchlevel\EventSourcing\Repository\DefaultRepositoryManager; diff --git a/tests/Integration/BankAccountSplitStream/Projection/BankAccountProjector.php b/tests/Integration/BankAccountSplitStream/Projection/BankAccountProjector.php index 310610db2..2d09c9ae9 100644 --- a/tests/Integration/BankAccountSplitStream/Projection/BankAccountProjector.php +++ b/tests/Integration/BankAccountSplitStream/Projection/BankAccountProjector.php @@ -10,7 +10,7 @@ use Patchlevel\EventSourcing\Attribute\Setup; use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Attribute\Teardown; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Tests\Integration\BankAccountSplitStream\Events\BalanceAdded; use Patchlevel\EventSourcing\Tests\Integration\BankAccountSplitStream\Events\BankAccountCreated; diff --git a/tests/Integration/BasicImplementation/BasicIntegrationTest.php b/tests/Integration/BasicImplementation/BasicIntegrationTest.php index e8db9686c..6d2bce8f2 100644 --- a/tests/Integration/BasicImplementation/BasicIntegrationTest.php +++ b/tests/Integration/BasicImplementation/BasicIntegrationTest.php @@ -6,7 +6,7 @@ use Doctrine\DBAL\Connection; use Patchlevel\EventSourcing\EventBus\DefaultEventBus; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootRegistry; use Patchlevel\EventSourcing\Repository\DefaultRepositoryManager; use Patchlevel\EventSourcing\Schema\DoctrineSchemaDirector; diff --git a/tests/Integration/BasicImplementation/MessageDecorator/FooMessageDecorator.php b/tests/Integration/BasicImplementation/MessageDecorator/FooMessageDecorator.php index 52b7758d9..d1b26f48a 100644 --- a/tests/Integration/BasicImplementation/MessageDecorator/FooMessageDecorator.php +++ b/tests/Integration/BasicImplementation/MessageDecorator/FooMessageDecorator.php @@ -6,7 +6,7 @@ use Integration\BasicImplementation\Header\BazHeader; use Integration\BasicImplementation\Header\FooHeader; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Repository\MessageDecorator\MessageDecorator; final class FooMessageDecorator implements MessageDecorator diff --git a/tests/Integration/BasicImplementation/Processor/SendEmailProcessor.php b/tests/Integration/BasicImplementation/Processor/SendEmailProcessor.php index 2e9c26072..d68809df7 100644 --- a/tests/Integration/BasicImplementation/Processor/SendEmailProcessor.php +++ b/tests/Integration/BasicImplementation/Processor/SendEmailProcessor.php @@ -5,7 +5,7 @@ namespace Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Processor; use Patchlevel\EventSourcing\Attribute\Subscribe; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Events\ProfileCreated; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\SendEmailMock; diff --git a/tests/Integration/BasicImplementation/Projection/ProfileProjector.php b/tests/Integration/BasicImplementation/Projection/ProfileProjector.php index 7913679cf..6add789b4 100644 --- a/tests/Integration/BasicImplementation/Projection/ProfileProjector.php +++ b/tests/Integration/BasicImplementation/Projection/ProfileProjector.php @@ -10,7 +10,7 @@ use Patchlevel\EventSourcing\Attribute\Setup; use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Attribute\Teardown; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Tests\Integration\BasicImplementation\Events\ProfileCreated; use function assert; diff --git a/tests/Integration/Pipeline/PipelineChangeStoreTest.php b/tests/Integration/Pipeline/PipelineChangeStoreTest.php index 3775c5f12..565ed9b98 100644 --- a/tests/Integration/Pipeline/PipelineChangeStoreTest.php +++ b/tests/Integration/Pipeline/PipelineChangeStoreTest.php @@ -6,7 +6,7 @@ use Doctrine\DBAL\Connection; use Patchlevel\EventSourcing\EventBus\DefaultEventBus; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Pipeline\Middleware\ExcludeEventMiddleware; use Patchlevel\EventSourcing\Pipeline\Middleware\RecalculatePlayheadMiddleware; use Patchlevel\EventSourcing\Pipeline\Middleware\ReplaceEventMiddleware; diff --git a/tests/Integration/Store/StoreTest.php b/tests/Integration/Store/StoreTest.php index 6c0fb9065..5ef674048 100644 --- a/tests/Integration/Store/StoreTest.php +++ b/tests/Integration/Store/StoreTest.php @@ -7,8 +7,8 @@ use DateTimeImmutable; use Doctrine\DBAL\Connection; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; -use Patchlevel\EventSourcing\EventBus\Message; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Message; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Schema\DoctrineSchemaDirector; use Patchlevel\EventSourcing\Serializer\DefaultEventSerializer; use Patchlevel\EventSourcing\Store\DoctrineDbalStore; diff --git a/tests/Integration/Subscription/Subscriber/ErrorProducerSubscriber.php b/tests/Integration/Subscription/Subscriber/ErrorProducerSubscriber.php index d7c554b97..e64f3d4ba 100644 --- a/tests/Integration/Subscription/Subscriber/ErrorProducerSubscriber.php +++ b/tests/Integration/Subscription/Subscriber/ErrorProducerSubscriber.php @@ -8,7 +8,7 @@ use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Attribute\Subscriber; use Patchlevel\EventSourcing\Attribute\Teardown; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Subscription\RunMode; use RuntimeException; diff --git a/tests/Integration/Subscription/Subscriber/ProfileNewProjection.php b/tests/Integration/Subscription/Subscriber/ProfileNewProjection.php index 36c52326d..40f6a1fd8 100644 --- a/tests/Integration/Subscription/Subscriber/ProfileNewProjection.php +++ b/tests/Integration/Subscription/Subscriber/ProfileNewProjection.php @@ -10,7 +10,7 @@ use Patchlevel\EventSourcing\Attribute\Setup; use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Attribute\Teardown; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Subscription\Subscriber\SubscriberUtil; use Patchlevel\EventSourcing\Tests\Integration\Subscription\Events\ProfileCreated; diff --git a/tests/Integration/Subscription/Subscriber/ProfileProcessor.php b/tests/Integration/Subscription/Subscriber/ProfileProcessor.php index 71bb63e14..78bfc31ac 100644 --- a/tests/Integration/Subscription/Subscriber/ProfileProcessor.php +++ b/tests/Integration/Subscription/Subscriber/ProfileProcessor.php @@ -6,7 +6,7 @@ use Patchlevel\EventSourcing\Attribute\Processor; use Patchlevel\EventSourcing\Attribute\Subscribe; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Repository\RepositoryManager; use Patchlevel\EventSourcing\Tests\Integration\Subscription\Aggregate\Profile; use Patchlevel\EventSourcing\Tests\Integration\Subscription\Events\ProfileCreated; diff --git a/tests/Integration/Subscription/Subscriber/ProfileProjection.php b/tests/Integration/Subscription/Subscriber/ProfileProjection.php index 8e576ea64..934b4c222 100644 --- a/tests/Integration/Subscription/Subscriber/ProfileProjection.php +++ b/tests/Integration/Subscription/Subscriber/ProfileProjection.php @@ -10,7 +10,7 @@ use Patchlevel\EventSourcing\Attribute\Setup; use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Attribute\Teardown; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Subscription\Subscriber\SubscriberUtil; use Patchlevel\EventSourcing\Tests\Integration\Subscription\Events\ProfileCreated; diff --git a/tests/Integration/Subscription/SubscriptionTest.php b/tests/Integration/Subscription/SubscriptionTest.php index 8541ea384..3640c7c4f 100644 --- a/tests/Integration/Subscription/SubscriptionTest.php +++ b/tests/Integration/Subscription/SubscriptionTest.php @@ -12,8 +12,8 @@ use Patchlevel\EventSourcing\Debug\Trace\TraceHeader; use Patchlevel\EventSourcing\Debug\Trace\TraceStack; use Patchlevel\EventSourcing\EventBus\DefaultEventBus; -use Patchlevel\EventSourcing\EventBus\Message; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Message; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootRegistry; use Patchlevel\EventSourcing\Repository\DefaultRepositoryManager; use Patchlevel\EventSourcing\Schema\ChainDoctrineSchemaConfigurator; diff --git a/tests/Unit/Console/Command/ShowAggregateCommandTest.php b/tests/Unit/Console/Command/ShowAggregateCommandTest.php index 190dd4750..0bda55eb9 100644 --- a/tests/Unit/Console/Command/ShowAggregateCommandTest.php +++ b/tests/Unit/Console/Command/ShowAggregateCommandTest.php @@ -8,8 +8,8 @@ use InvalidArgumentException; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; use Patchlevel\EventSourcing\Console\Command\ShowAggregateCommand; -use Patchlevel\EventSourcing\EventBus\Message; -use Patchlevel\EventSourcing\EventBus\Serializer\HeadersSerializer; +use Patchlevel\EventSourcing\Message\Message; +use Patchlevel\EventSourcing\Message\Serializer\HeadersSerializer; use Patchlevel\EventSourcing\Metadata\AggregateRoot\AggregateRootRegistry; use Patchlevel\EventSourcing\Serializer\Encoder\Encoder; use Patchlevel\EventSourcing\Serializer\EventSerializer; diff --git a/tests/Unit/Console/OutputStyleTest.php b/tests/Unit/Console/OutputStyleTest.php index a0bc8fb51..970ce76be 100644 --- a/tests/Unit/Console/OutputStyleTest.php +++ b/tests/Unit/Console/OutputStyleTest.php @@ -7,8 +7,8 @@ use DateTimeImmutable; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; use Patchlevel\EventSourcing\Console\OutputStyle; -use Patchlevel\EventSourcing\EventBus\Message; -use Patchlevel\EventSourcing\EventBus\Serializer\HeadersSerializer; +use Patchlevel\EventSourcing\Message\Message; +use Patchlevel\EventSourcing\Message\Serializer\HeadersSerializer; use Patchlevel\EventSourcing\Serializer\Encoder\Encoder; use Patchlevel\EventSourcing\Serializer\EventSerializer; use Patchlevel\EventSourcing\Serializer\SerializedEvent; diff --git a/tests/Unit/Debug/Trace/TraceDecoratorTest.php b/tests/Unit/Debug/Trace/TraceDecoratorTest.php index 851202de2..9974c69d6 100644 --- a/tests/Unit/Debug/Trace/TraceDecoratorTest.php +++ b/tests/Unit/Debug/Trace/TraceDecoratorTest.php @@ -8,8 +8,8 @@ use Patchlevel\EventSourcing\Debug\Trace\TraceDecorator; use Patchlevel\EventSourcing\Debug\Trace\TraceHeader; use Patchlevel\EventSourcing\Debug\Trace\TraceStack; -use Patchlevel\EventSourcing\EventBus\HeaderNotFound; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\HeaderNotFound; +use Patchlevel\EventSourcing\Message\Message; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; use stdClass; diff --git a/tests/Unit/EventBus/AttributeListenerProviderTest.php b/tests/Unit/EventBus/AttributeListenerProviderTest.php index 3d2108a15..7fee41ed0 100644 --- a/tests/Unit/EventBus/AttributeListenerProviderTest.php +++ b/tests/Unit/EventBus/AttributeListenerProviderTest.php @@ -7,7 +7,7 @@ use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\EventBus\AttributeListenerProvider; use Patchlevel\EventSourcing\EventBus\ListenerDescriptor; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileVisited; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/EventBus/DefaultConsumerTest.php b/tests/Unit/EventBus/DefaultConsumerTest.php index e2fc23a8a..895b4afcc 100644 --- a/tests/Unit/EventBus/DefaultConsumerTest.php +++ b/tests/Unit/EventBus/DefaultConsumerTest.php @@ -8,7 +8,7 @@ use Patchlevel\EventSourcing\EventBus\DefaultConsumer; use Patchlevel\EventSourcing\EventBus\ListenerDescriptor; use Patchlevel\EventSourcing\EventBus\ListenerProvider; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; diff --git a/tests/Unit/EventBus/DefaultEventBusTest.php b/tests/Unit/EventBus/DefaultEventBusTest.php index 1d020aa8d..55727c6c4 100644 --- a/tests/Unit/EventBus/DefaultEventBusTest.php +++ b/tests/Unit/EventBus/DefaultEventBusTest.php @@ -7,7 +7,7 @@ use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\EventBus\Consumer; use Patchlevel\EventSourcing\EventBus\DefaultEventBus; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\NameChanged; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; diff --git a/tests/Unit/EventBus/Psr14EventBusTest.php b/tests/Unit/EventBus/Psr14EventBusTest.php index 0827a8f95..7fbdfef50 100644 --- a/tests/Unit/EventBus/Psr14EventBusTest.php +++ b/tests/Unit/EventBus/Psr14EventBusTest.php @@ -4,8 +4,8 @@ namespace Patchlevel\EventSourcing\Tests\Unit\EventBus; -use Patchlevel\EventSourcing\EventBus\Message; use Patchlevel\EventSourcing\EventBus\Psr14EventBus; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; diff --git a/tests/Unit/EventBus/HeaderNotFoundTest.php b/tests/Unit/Message/HeaderNotFoundTest.php similarity index 64% rename from tests/Unit/EventBus/HeaderNotFoundTest.php rename to tests/Unit/Message/HeaderNotFoundTest.php index ab947b9e4..06fe1c0a6 100644 --- a/tests/Unit/EventBus/HeaderNotFoundTest.php +++ b/tests/Unit/Message/HeaderNotFoundTest.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Patchlevel\EventSourcing\Tests\Unit\EventBus; +namespace Patchlevel\EventSourcing\Tests\Unit\Message; -use Patchlevel\EventSourcing\EventBus\HeaderNotFound; +use Patchlevel\EventSourcing\Message\HeaderNotFound; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\EventBus\HeaderNotFound */ +/** @covers \Patchlevel\EventSourcing\Message\HeaderNotFound */ final class HeaderNotFoundTest extends TestCase { public function testNotFound(): void diff --git a/tests/Unit/EventBus/MessageTest.php b/tests/Unit/Message/MessageTest.php similarity index 94% rename from tests/Unit/EventBus/MessageTest.php rename to tests/Unit/Message/MessageTest.php index 3d4016dcf..97e340fec 100644 --- a/tests/Unit/EventBus/MessageTest.php +++ b/tests/Unit/Message/MessageTest.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Patchlevel\EventSourcing\Tests\Unit\EventBus; +namespace Patchlevel\EventSourcing\Tests\Unit\Message; use DateTimeImmutable; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; -use Patchlevel\EventSourcing\EventBus\HeaderNotFound; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\HeaderNotFound; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Store\ArchivedHeader; use Patchlevel\EventSourcing\Store\NewStreamStartHeader; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; @@ -15,7 +15,7 @@ use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileId; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\EventBus\Message */ +/** @covers \Patchlevel\EventSourcing\Message\Message */ final class MessageTest extends TestCase { public function testEmptyMessage(): void diff --git a/tests/Unit/EventBus/Serializer/DeserializeFailedTest.php b/tests/Unit/Message/Serializer/DeserializeFailedTest.php similarity index 76% rename from tests/Unit/EventBus/Serializer/DeserializeFailedTest.php rename to tests/Unit/Message/Serializer/DeserializeFailedTest.php index 56f8471bd..c6fb4ccb7 100644 --- a/tests/Unit/EventBus/Serializer/DeserializeFailedTest.php +++ b/tests/Unit/Message/Serializer/DeserializeFailedTest.php @@ -2,12 +2,12 @@ declare(strict_types=1); -namespace Patchlevel\EventSourcing\Tests\Unit\EventBus\Serializer; +namespace Patchlevel\EventSourcing\Tests\Unit\Message\Serializer; -use Patchlevel\EventSourcing\EventBus\Serializer\DeserializeFailed; +use Patchlevel\EventSourcing\Message\Serializer\DeserializeFailed; use PHPUnit\Framework\TestCase; -/** @covers \Patchlevel\EventSourcing\EventBus\Serializer\DeserializeFailed */ +/** @covers \Patchlevel\EventSourcing\Message\Serializer\DeserializeFailed */ final class DeserializeFailedTest extends TestCase { public function testDecodeFailed(): void diff --git a/tests/Unit/EventBus/Serializer/HeadersSerializerTest.php b/tests/Unit/Message/Serializer/HeadersSerializerTest.php similarity index 90% rename from tests/Unit/EventBus/Serializer/HeadersSerializerTest.php rename to tests/Unit/Message/Serializer/HeadersSerializerTest.php index 4515332ae..a1d8b587f 100644 --- a/tests/Unit/EventBus/Serializer/HeadersSerializerTest.php +++ b/tests/Unit/Message/Serializer/HeadersSerializerTest.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace Patchlevel\EventSourcing\Tests\Unit\EventBus\Serializer; +namespace Patchlevel\EventSourcing\Tests\Unit\Message\Serializer; use DateTimeImmutable; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; -use Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer; +use Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer; use Patchlevel\EventSourcing\Metadata\Message\AttributeMessageHeaderRegistryFactory; use Patchlevel\EventSourcing\Serializer\Encoder\JsonEncoder; use Patchlevel\EventSourcing\Store\ArchivedHeader; @@ -14,7 +14,7 @@ use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; -/** @covers \Patchlevel\EventSourcing\EventBus\Serializer\DefaultHeadersSerializer */ +/** @covers \Patchlevel\EventSourcing\Message\Serializer\DefaultHeadersSerializer */ final class HeadersSerializerTest extends TestCase { use ProphecyTrait; diff --git a/tests/Unit/Pipeline/Middleware/ChainMiddlewareTest.php b/tests/Unit/Pipeline/Middleware/ChainMiddlewareTest.php index 3eb7a06a3..8f6b0ea36 100644 --- a/tests/Unit/Pipeline/Middleware/ChainMiddlewareTest.php +++ b/tests/Unit/Pipeline/Middleware/ChainMiddlewareTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Middleware; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\ChainMiddleware; use Patchlevel\EventSourcing\Pipeline\Middleware\Middleware; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; diff --git a/tests/Unit/Pipeline/Middleware/ExcludeArchivedEventMiddlewareTest.php b/tests/Unit/Pipeline/Middleware/ExcludeArchivedEventMiddlewareTest.php index 2c4bc5b1c..4d3849dcb 100644 --- a/tests/Unit/Pipeline/Middleware/ExcludeArchivedEventMiddlewareTest.php +++ b/tests/Unit/Pipeline/Middleware/ExcludeArchivedEventMiddlewareTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Middleware; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\ExcludeArchivedEventMiddleware; use Patchlevel\EventSourcing\Store\ArchivedHeader; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; diff --git a/tests/Unit/Pipeline/Middleware/ExcludeEventMiddlewareTest.php b/tests/Unit/Pipeline/Middleware/ExcludeEventMiddlewareTest.php index 80cfdefe9..d305f1bd3 100644 --- a/tests/Unit/Pipeline/Middleware/ExcludeEventMiddlewareTest.php +++ b/tests/Unit/Pipeline/Middleware/ExcludeEventMiddlewareTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Middleware; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\ExcludeEventMiddleware; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; diff --git a/tests/Unit/Pipeline/Middleware/FilterEventMiddlewareTest.php b/tests/Unit/Pipeline/Middleware/FilterEventMiddlewareTest.php index 8e7077f88..5ddc0f7e1 100644 --- a/tests/Unit/Pipeline/Middleware/FilterEventMiddlewareTest.php +++ b/tests/Unit/Pipeline/Middleware/FilterEventMiddlewareTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Middleware; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\FilterEventMiddleware; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; diff --git a/tests/Unit/Pipeline/Middleware/IncludeEventMiddlewareTest.php b/tests/Unit/Pipeline/Middleware/IncludeEventMiddlewareTest.php index 58b8ce9cc..2ba7171e3 100644 --- a/tests/Unit/Pipeline/Middleware/IncludeEventMiddlewareTest.php +++ b/tests/Unit/Pipeline/Middleware/IncludeEventMiddlewareTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Middleware; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\IncludeEventMiddleware; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; diff --git a/tests/Unit/Pipeline/Middleware/OnlyArchivedEventMiddlewareTest.php b/tests/Unit/Pipeline/Middleware/OnlyArchivedEventMiddlewareTest.php index 48dca34e7..b42910da5 100644 --- a/tests/Unit/Pipeline/Middleware/OnlyArchivedEventMiddlewareTest.php +++ b/tests/Unit/Pipeline/Middleware/OnlyArchivedEventMiddlewareTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Middleware; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\OnlyArchivedEventMiddleware; use Patchlevel\EventSourcing\Store\ArchivedHeader; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; diff --git a/tests/Unit/Pipeline/Middleware/RecalculatePlayheadMiddlewareTest.php b/tests/Unit/Pipeline/Middleware/RecalculatePlayheadMiddlewareTest.php index 558f5f1ba..f152e804a 100644 --- a/tests/Unit/Pipeline/Middleware/RecalculatePlayheadMiddlewareTest.php +++ b/tests/Unit/Pipeline/Middleware/RecalculatePlayheadMiddlewareTest.php @@ -6,7 +6,7 @@ use DateTimeImmutable; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\RecalculatePlayheadMiddleware; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; diff --git a/tests/Unit/Pipeline/Middleware/ReplaceEventMiddlewareTest.php b/tests/Unit/Pipeline/Middleware/ReplaceEventMiddlewareTest.php index 8d724ca6a..d7098a9f0 100644 --- a/tests/Unit/Pipeline/Middleware/ReplaceEventMiddlewareTest.php +++ b/tests/Unit/Pipeline/Middleware/ReplaceEventMiddlewareTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Middleware; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\ReplaceEventMiddleware; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\MessagePublished; diff --git a/tests/Unit/Pipeline/Middleware/UntilEventMiddlewareTest.php b/tests/Unit/Pipeline/Middleware/UntilEventMiddlewareTest.php index 9d5d96832..891d22e43 100644 --- a/tests/Unit/Pipeline/Middleware/UntilEventMiddlewareTest.php +++ b/tests/Unit/Pipeline/Middleware/UntilEventMiddlewareTest.php @@ -6,7 +6,7 @@ use DateTimeImmutable; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\UntilEventMiddleware; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; diff --git a/tests/Unit/Pipeline/PipelineTest.php b/tests/Unit/Pipeline/PipelineTest.php index 90cc8eda6..38dde9de0 100644 --- a/tests/Unit/Pipeline/PipelineTest.php +++ b/tests/Unit/Pipeline/PipelineTest.php @@ -6,7 +6,7 @@ use DateTimeImmutable; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Middleware\ExcludeEventMiddleware; use Patchlevel\EventSourcing\Pipeline\Middleware\RecalculatePlayheadMiddleware; use Patchlevel\EventSourcing\Pipeline\Pipeline; diff --git a/tests/Unit/Pipeline/Source/InMemorySourceTest.php b/tests/Unit/Pipeline/Source/InMemorySourceTest.php index ce4ff5bc0..09592915b 100644 --- a/tests/Unit/Pipeline/Source/InMemorySourceTest.php +++ b/tests/Unit/Pipeline/Source/InMemorySourceTest.php @@ -5,7 +5,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Source; use ArrayIterator; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Source\InMemorySource; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; diff --git a/tests/Unit/Pipeline/Source/StoreSourceTest.php b/tests/Unit/Pipeline/Source/StoreSourceTest.php index 879cd7462..0e3980f24 100644 --- a/tests/Unit/Pipeline/Source/StoreSourceTest.php +++ b/tests/Unit/Pipeline/Source/StoreSourceTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Source; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Source\StoreSource; use Patchlevel\EventSourcing\Store\ArrayStream; use Patchlevel\EventSourcing\Store\Criteria; diff --git a/tests/Unit/Pipeline/Target/ConsumerTargetTest.php b/tests/Unit/Pipeline/Target/ConsumerTargetTest.php index c93464536..d495d5806 100644 --- a/tests/Unit/Pipeline/Target/ConsumerTargetTest.php +++ b/tests/Unit/Pipeline/Target/ConsumerTargetTest.php @@ -6,7 +6,7 @@ use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\EventBus\Consumer; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Target\ConsumerTarget; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; diff --git a/tests/Unit/Pipeline/Target/InMemoryTargetTest.php b/tests/Unit/Pipeline/Target/InMemoryTargetTest.php index b56e08fcf..b18bfd0d4 100644 --- a/tests/Unit/Pipeline/Target/InMemoryTargetTest.php +++ b/tests/Unit/Pipeline/Target/InMemoryTargetTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Target; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Target\InMemoryTarget; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; diff --git a/tests/Unit/Pipeline/Target/StoreTargetTest.php b/tests/Unit/Pipeline/Target/StoreTargetTest.php index 1423e3f6e..187ac642a 100644 --- a/tests/Unit/Pipeline/Target/StoreTargetTest.php +++ b/tests/Unit/Pipeline/Target/StoreTargetTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Pipeline\Target; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Pipeline\Target\StoreTarget; use Patchlevel\EventSourcing\Store\Store; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; diff --git a/tests/Unit/Repository/DefaultRepositoryTest.php b/tests/Unit/Repository/DefaultRepositoryTest.php index 77c4f92cd..ec6d2e894 100644 --- a/tests/Unit/Repository/DefaultRepositoryTest.php +++ b/tests/Unit/Repository/DefaultRepositoryTest.php @@ -7,7 +7,7 @@ use DateTimeImmutable; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; use Patchlevel\EventSourcing\EventBus\EventBus; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Metadata\Event\AttributeEventMetadataFactory; use Patchlevel\EventSourcing\Repository\AggregateAlreadyExists; use Patchlevel\EventSourcing\Repository\AggregateDetached; diff --git a/tests/Unit/Repository/MessageDecorator/ChainMessageDecoratorTest.php b/tests/Unit/Repository/MessageDecorator/ChainMessageDecoratorTest.php index 619111f38..856304004 100644 --- a/tests/Unit/Repository/MessageDecorator/ChainMessageDecoratorTest.php +++ b/tests/Unit/Repository/MessageDecorator/ChainMessageDecoratorTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Repository\MessageDecorator; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Repository\MessageDecorator\ChainMessageDecorator; use Patchlevel\EventSourcing\Repository\MessageDecorator\MessageDecorator; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; diff --git a/tests/Unit/Repository/MessageDecorator/SplitStreamDecoratorTest.php b/tests/Unit/Repository/MessageDecorator/SplitStreamDecoratorTest.php index 84df77855..2a319e853 100644 --- a/tests/Unit/Repository/MessageDecorator/SplitStreamDecoratorTest.php +++ b/tests/Unit/Repository/MessageDecorator/SplitStreamDecoratorTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Repository\MessageDecorator; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Metadata\Event\AttributeEventMetadataFactory; use Patchlevel\EventSourcing\Repository\MessageDecorator\SplitStreamDecorator; use Patchlevel\EventSourcing\Store\NewStreamStartHeader; diff --git a/tests/Unit/Store/ArrayStreamTest.php b/tests/Unit/Store/ArrayStreamTest.php index 3347787b1..5bab74a72 100644 --- a/tests/Unit/Store/ArrayStreamTest.php +++ b/tests/Unit/Store/ArrayStreamTest.php @@ -4,7 +4,7 @@ namespace Patchlevel\EventSourcing\Tests\Unit\Store; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Store\ArrayStream; use Patchlevel\EventSourcing\Tests\Unit\Fixture\Email; use Patchlevel\EventSourcing\Tests\Unit\Fixture\ProfileCreated; diff --git a/tests/Unit/Store/DoctrineDbalStoreTest.php b/tests/Unit/Store/DoctrineDbalStoreTest.php index 7ce539fae..b03b980a9 100644 --- a/tests/Unit/Store/DoctrineDbalStoreTest.php +++ b/tests/Unit/Store/DoctrineDbalStoreTest.php @@ -18,8 +18,8 @@ use Doctrine\DBAL\Types\Types; use EmptyIterator; use Patchlevel\EventSourcing\Aggregate\AggregateHeader; -use Patchlevel\EventSourcing\EventBus\Message; -use Patchlevel\EventSourcing\EventBus\Serializer\HeadersSerializer; +use Patchlevel\EventSourcing\Message\Message; +use Patchlevel\EventSourcing\Message\Serializer\HeadersSerializer; use Patchlevel\EventSourcing\Serializer\EventSerializer; use Patchlevel\EventSourcing\Serializer\SerializedEvent; use Patchlevel\EventSourcing\Store\CriteriaBuilder; diff --git a/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php b/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php index 7328de74c..e447795eb 100644 --- a/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php +++ b/tests/Unit/Subscription/Engine/DefaultSubscriptionEngineTest.php @@ -10,7 +10,7 @@ use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Attribute\Subscriber; use Patchlevel\EventSourcing\Attribute\Teardown; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Store\ArrayStream; use Patchlevel\EventSourcing\Store\Criteria; use Patchlevel\EventSourcing\Store\Store; diff --git a/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorTest.php b/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorTest.php index d2516c9af..6e19f2053 100644 --- a/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorTest.php +++ b/tests/Unit/Subscription/Subscriber/MetadataSubscriberAccessorTest.php @@ -8,7 +8,7 @@ use Patchlevel\EventSourcing\Attribute\Subscribe; use Patchlevel\EventSourcing\Attribute\Subscriber; use Patchlevel\EventSourcing\Attribute\Teardown; -use Patchlevel\EventSourcing\EventBus\Message; +use Patchlevel\EventSourcing\Message\Message; use Patchlevel\EventSourcing\Metadata\Subscriber\AttributeSubscriberMetadataFactory; use Patchlevel\EventSourcing\Subscription\RunMode; use Patchlevel\EventSourcing\Subscription\Subscriber\MetadataSubscriberAccessor;