Skip to content

Commit 966850c

Browse files
committed
Fixes and improvements
1 parent 3d19d98 commit 966850c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

components/uid.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,11 @@ your services and use it as follows:
176176
{
177177
$uuid = $this->uuidFactory->create();
178178

179-
$nameBasedUuid = $this->uuidFactory->nameBased(/** ... */);
180-
$randomBasedUuid = $this->uuidFactory->randomBased();
181-
$timestampBased = $this->uuidFactory->timeBased();
179+
$randomBasedUuid = $this->uuidFactory->randomBased()->create();
180+
// $namespace can be omitted if a default is configured in the factory (see below)
181+
$nameBasedUuid = $this->uuidFactory->nameBased($namespace)->create();
182+
// $node can be omitted if a default node is configured in the factory (see below)
183+
$timestampBased = $this->uuidFactory->timeBased($node)->create();
182184

183185
// ...
184186
}
@@ -253,7 +255,7 @@ You can configure these default values::
253255
.. versionadded:: 7.4
254256

255257
Starting from Symfony 7.4, the default version for both UUIDs and time-based
256-
UUIDs is UUIDv7. In previous versions, the default was UUIDv6.
258+
UUIDs is v7. In previous versions, the default was v6.
257259

258260
Converting UUIDs
259261
~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)