Skip to content

Commit ee78f6e

Browse files
committed
Add documentation for UUID generator
1 parent 083dc37 commit ee78f6e

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ vivait_string_generator:
3434
string: vivait_generator.generator.string
3535
secure_bytes: vivait_generator.generator.secure_bytes
3636
secure_string: vivait_generator.generator.secure_string
37+
38+
# For use this generator you should require the package ramsey/uuid in your application.
3739
uuid_string: vivait_generator.generator.uuid_string
3840
```
3941
@@ -61,6 +63,18 @@ Generates a secure random byte string using the `Symfony\Component\Security\Core
6163
@Generate(generator="secure_bytes", options={"length"=8})
6264
```
6365

66+
### `UuidStringGenerator`
67+
For generate a UUID v4 (or v1):
68+
69+
```php
70+
@Generate(generator="uuid_string", options={"version"=4})
71+
```
72+
73+
You can use also namespaced versions (v3 and v5). For example with the v5:
74+
```php
75+
@Generate(generator="uuid_string", options={"version"=5}, namespace="my_namespace")
76+
```
77+
6478
## Usage
6579
Add the `@Generate(generator="generator_name")` annotation to an entity property
6680
(where `generator_name` is the name of a generator defined in the configuration).

0 commit comments

Comments
 (0)