9.0.0 requires webpatser/uuid 4.x. The only observable change is UUID v6: no public class, method or macro was added, removed or renamed between 8.0.0 and 9.0.0.
Requirements
| 8.x | 9.x | |
|---|---|---|
| PHP | ^8.6 | ^8.6 |
Laravel (illuminate/support) |
^13.0 | ^13.0 |
webpatser/uuid |
^3.0 | ^4.0 |
What changes
Str::reorderedTimeUuid()andStr::binaryReorderedTimeUuid()now return RFC 9562 v6 values, which sort by creation time. Newly generated values differ from those generated by 8.x or earlier, which used the V1 field order.- Reading the time of a v6 value generated by 8.x or earlier (
Str::uuidTimestamp(),getUuidTimestamp()inHasUuidsandHasBinaryUuids) no longer returns its creation time and is not meaningful. - Stored v6 values stay valid and unique, but they were never time-ordered. Nothing needs migrating; only code that relies on the time of old v6 values is affected.
Steps
- Update the package. This also moves
webpatser/uuidto ^4.0:
composer require webpatser/laravel-uuid:^9.0
- If you required
webpatser/uuidyourself, raise its constraint to ^4.0 (see the UUID 4.x upgrade guide). - If you use v6, keep the points under What changes in mind.
Earlier upgrades
Coming from 7.x, read the 8.x upgrade guide as well.
Support policy
The package supports only the latest stable PHP release. When a new PHP version is released, the next release of the package requires it. See Installation.