File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,25 @@ Use these methods to transform the UUID object into different bases::
180180 $uuid->toRfc4122(); // string(36) "d9e7a184-5d5b-11ea-a62a-3499710062d0"
181181 $uuid->toHex(); // string(34) "0xd9e7a1845d5b11eaa62a3499710062d0"
182182
183+ Some UUID versions support being converted from one version to another::
184+
185+ // convert V1 to V6 or V7
186+ $uuid = Uuid::v1();
187+
188+ $uuid->toV6(); // returns a Symfony\Component\Uid\UuidV6 instance
189+ $uuid->toV7(); // returns a Symfony\Component\Uid\UuidV7 instance
190+
191+ // convert V6 to V7
192+ $uuid = Uuid::v6();
193+
194+ $uuid->toV7(); // returns a Symfony\Component\Uid\UuidV7 instance
195+
196+ .. versionadded :: 7.1
197+
198+ The :method: `Symfony\C omponent\U id\U uidV1::toV6 `,
199+ :method: `Symfony\C omponent\U id\U uidV1::toV7 ` and :method: `Symfony\C omponent\U id\U uidV6::toV7 `
200+ methods were introduced in Symfony 7.1.
201+
183202Working with UUIDs
184203~~~~~~~~~~~~~~~~~~
185204
You can’t perform that action at this time.
0 commit comments