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.
->timeon a v6 value generated by 3.x no longer returns its creation time and is not meaningful.version,variant,nodeand the string form are unaffected. Readingtimedecodes 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
- Run
composer require webpatser/uuid:^4.0. - If you use v6, do not read
timefrom v6 values generated by 3.x. - Run your tests.
Earlier upgrades
Coming from 2.x, read the 3.x upgrade guide as well.