Skip to content

Commit 70ab5b9

Browse files
committed
[Uid] Default to UuidV7 when using UuidFactory
1 parent ff25fb4 commit 70ab5b9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

components/uid.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ following methods to create a ``Uuid`` object from it::
158158
$uuid = Uuid::fromBase58('TuetYWNHhmuSQ3xPoVLv9M');
159159
$uuid = Uuid::fromRfc4122('d9e7a184-5d5b-11ea-a62a-3499710062d0');
160160

161-
You can also use the ``UuidFactory`` to generate UUIDs. First, you may
162-
configure the behavior of the factory using configuration files::
161+
You can also use the ``UuidFactory`` to generate UUIDs. By default, this factory
162+
uses UUIDv7 for default and time-based UUIDs, UUIDv5 for name-based UUIDS, and
163+
UUIDv4 for random-based UUIDs, but you can configure this behavior::
163164

164165
.. configuration-block::
165166

@@ -218,6 +219,11 @@ configure the behavior of the factory using configuration files::
218219
]);
219220
};
220221
222+
.. versionadded:: 7.4
223+
224+
Starting from Symfony 7.4, the default version for both UUIDs and time-based
225+
UUIDs is UUIDv7. In previous versions, the default was UUIDv6.
226+
221227
Then, you can inject the factory in your services and use it to generate UUIDs based
222228
on the configuration you defined::
223229

0 commit comments

Comments
 (0)