@@ -24,9 +24,9 @@ To make it easy to register with a name, we also add the `Aggregate` attribute.
2424
2525``` php
2626use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot;
27- use Patchlevel\EventSourcing\Aggregate\Uuid;
2827use Patchlevel\EventSourcing\Attribute\Aggregate;
2928use Patchlevel\EventSourcing\Attribute\Id;
29+ use Patchlevel\EventSourcing\Identifier\Uuid;
3030
3131#[Aggregate('profile')]
3232final class Profile extends BasicAggregateRoot
@@ -50,7 +50,7 @@ final class Profile extends BasicAggregateRoot
5050
5151!!! tip
5252
53- Find out more about aggregate IDs [here](./aggregate_id .md).
53+ Find out more about aggregate IDs [here](./identifier .md).
5454
5555We use a so-called named constructor here to create an object of the AggregateRoot.
5656The constructor itself is protected and cannot be called from outside.
@@ -94,8 +94,8 @@ For our aggregate we create the Event `ProfileRegistered` with an ID and a name.
9494We also give the event a unique name using the ` Event ` attribute.
9595
9696``` php
97- use Patchlevel\EventSourcing\Aggregate\Uuid;
9897use Patchlevel\EventSourcing\Attribute\Event;
98+ use Patchlevel\EventSourcing\Identifier\Uuid;
9999
100100#[Event('profile.registered')]
101101final class ProfileRegistered
@@ -115,10 +115,10 @@ After we have defined the event, we have to adapt the profile aggregate:
115115
116116``` php
117117use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot;
118- use Patchlevel\EventSourcing\Aggregate\Uuid;
119118use Patchlevel\EventSourcing\Attribute\Aggregate;
120119use Patchlevel\EventSourcing\Attribute\Apply;
121120use Patchlevel\EventSourcing\Attribute\Id;
121+ use Patchlevel\EventSourcing\Identifier\Uuid;
122122
123123#[Aggregate('profile')]
124124final class Profile extends BasicAggregateRoot
@@ -190,10 +190,10 @@ This method then creates the event `NameChanged` and records it:
190190
191191``` php
192192use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot;
193- use Patchlevel\EventSourcing\Aggregate\Uuid;
194193use Patchlevel\EventSourcing\Attribute\Aggregate;
195194use Patchlevel\EventSourcing\Attribute\Apply;
196195use Patchlevel\EventSourcing\Attribute\Id;
196+ use Patchlevel\EventSourcing\Identifier\Uuid;
197197
198198#[Aggregate('profile')]
199199final class Profile extends BasicAggregateRoot
@@ -466,10 +466,10 @@ We can now use the value object `Name` in our aggregate:
466466
467467``` php
468468use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot;
469- use Patchlevel\EventSourcing\Aggregate\Uuid;
470469use Patchlevel\EventSourcing\Attribute\Aggregate;
471470use Patchlevel\EventSourcing\Attribute\Apply;
472471use Patchlevel\EventSourcing\Attribute\Id;
472+ use Patchlevel\EventSourcing\Identifier\Uuid;
473473
474474#[Aggregate('profile')]
475475final class Profile extends BasicAggregateRoot
@@ -587,9 +587,9 @@ But you can pass this information by yourself.
587587
588588``` php
589589use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot;
590- use Patchlevel\EventSourcing\Aggregate\Uuid;
591590use Patchlevel\EventSourcing\Attribute\Aggregate;
592591use Patchlevel\EventSourcing\Attribute\Id;
592+ use Patchlevel\EventSourcing\Identifier\Uuid;
593593
594594#[Aggregate('profile')]
595595final class Profile extends BasicAggregateRoot
@@ -614,9 +614,9 @@ But if you still want to make sure that the time is "now" and not in the past or
614614
615615``` php
616616use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot;
617- use Patchlevel\EventSourcing\Aggregate\Uuid;
618617use Patchlevel\EventSourcing\Attribute\Aggregate;
619618use Patchlevel\EventSourcing\Attribute\Id;
619+ use Patchlevel\EventSourcing\Identifier\Uuid;
620620use Psr\Clock\ClockInterface;
621621
622622#[Aggregate('profile')]
@@ -663,10 +663,10 @@ The order handle the order itself and the shipping handle the shipping of the or
663663
664664``` php
665665use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot;
666- use Patchlevel\EventSourcing\Aggregate\Uuid;
667666use Patchlevel\EventSourcing\Attribute\Aggregate;
668667use Patchlevel\EventSourcing\Attribute\Apply;
669668use Patchlevel\EventSourcing\Attribute\Id;
669+ use Patchlevel\EventSourcing\Identifier\Uuid;
670670
671671#[Aggregate('order')]
672672final class Order extends BasicAggregateRoot
@@ -694,11 +694,11 @@ In this case, the `Shipping` aggregate listens to the `OrderCreated` event to in
694694
695695``` php
696696use Patchlevel\EventSourcing\Aggregate\BasicAggregateRoot;
697- use Patchlevel\EventSourcing\Aggregate\Uuid;
698697use Patchlevel\EventSourcing\Attribute\Aggregate;
699698use Patchlevel\EventSourcing\Attribute\Apply;
700699use Patchlevel\EventSourcing\Attribute\Id;
701700use Patchlevel\EventSourcing\Attribute\Stream;
701+ use Patchlevel\EventSourcing\Identifier\Uuid;
702702
703703#[Aggregate('shipping')]
704704#[Stream(Order::class)]
@@ -756,7 +756,7 @@ $aggregateRegistry = (new AttributeAggregateRootRegistryFactory())->create([/* p
756756```
757757## Learn more
758758
759- * [ How to create own aggregate id] ( aggregate_id .md)
759+ * [ How to create own aggregate id] ( identifier .md)
760760* [ How to store and load aggregates] ( repository.md )
761761* [ How to snapshot aggregates] ( snapshots.md )
762762* [ How to create Projections] ( subscription.md )
0 commit comments