@@ -7,12 +7,12 @@ since only an aggregate-wide unique string is expected in the store.
77
88This library provides you with a few options for generating the id.
99
10- !!! warning
10+ ::: warning
11+ Performance reasons, the default configuration of the store require an uuid string for ` aggregate id ` .
12+ But technically, for the library, it can be any string.
13+ If you want to use a custom id, you have to change the ` aggregate_id_type ` in the [ store] ( store.md ) configuration.
14+ :::
1115
12- Performance reasons, the default configuration of the store require an uuid string for `aggregate id`.
13- But technically, for the library, it can be any string.
14- If you want to use a custom id, you have to change the `aggregate_id_type` in the [store](store.md) configuration.
15-
1616## Uuid
1717
1818The easiest way is to use an ` uuid ` as an aggregate ID.
@@ -41,11 +41,12 @@ use Patchlevel\EventSourcing\Aggregate\Uuid;
4141$uuid = Uuid::generate();
4242$uuid = Uuid::fromString('d6e8d7a0-4b0b-4e6a-8a9a-3a0b2d9d0e4e');
4343```
44- !!! Note
4544
46- We implemented the version 7 of the uuid, because it is most suitable for event sourcing.
47- More information about uuid versions can be found [here](https://uuid.ramsey.dev/en/stable/rfc4122.html).
48-
45+ ::: note
46+ We implemented the version 7 of the uuid, because it is most suitable for event sourcing.
47+ More information about uuid versions can be found [ here] ( https://uuid.ramsey.dev/en/stable/rfc4122.html ) .
48+ :::
49+
4950## Custom ID
5051
5152If you don't want to use an uuid, you can also use the custom ID implementation.
@@ -64,12 +65,13 @@ final class Profile extends BasicAggregateRoot
6465 private CustomId $id;
6566}
6667```
67- !!! warning
6868
69- If you want to use a custom id that is not an uuid,
70- you need to change the `aggregate_id_type` to `string` in the store configuration.
71- More information can be found [here](store.md).
72-
69+ ::: warning
70+ If you want to use a custom id that is not an uuid,
71+ you need to change the ` aggregate_id_type ` to ` string ` in the store configuration.
72+ More information can be found [ here] ( store.md ) .
73+ :::
74+
7375So you can use any string as an id:
7476
7577``` php
0 commit comments