~/docs
Resonate
Resonate
4.x 4.0.0, current 3.x 3.0.1 2.x 2.0.1 1.x 1.3.0
UUID Library
Toggle sidebar
UUID Library
webpatser/uuid 4.0.0

UUID Library 4.x

Upgrade Guide

What changes when you move from webpatser/uuid 3.x to 4.0, where UUID v6 follows the RFC 9562 field order.

Version 4.0.0 changes only UUID v6. Everything else (the API, the other versions, the PHP requirement) is unchanged from 3.x.

What changes

  • UUID v6 now uses the RFC 9562 field order, so newly generated v6 values sort by creation time. They differ from v6 values generated by 3.x, which used the V1 field order and were never time-ordered.
  • ->time on a v6 value generated by 3.x no longer returns its creation time and is not meaningful. version, variant, node and the string form are unaffected. Reading time decodes v6 values with the RFC 9562 layout.

What to do

Nothing for most users:

composer require webpatser/uuid:^4.0

If you use v6, keep the two points above in mind. Stored v6 values stay valid and unique.

Changes since 3.0.1

Area Change
Requirement PHP ^8.6, unchanged
UUID v6 RFC 9562 field order, new values differ from 3.x
Other versions and public API No change

Upgrade checklist

  1. Run composer require webpatser/uuid:^4.0.
  2. If you use v6, do not read time from v6 values generated by 3.x.
  3. Run your tests.

Earlier upgrades

Coming from 2.x, read the 3.x upgrade guide as well.