~/docs
Resonate
Resonate
9.x 9.0.0, current 8.x 8.0.0 7.x 7.0.1 6.x 6.2.1 5.x 5.1.2 4.x 4.0.2
Laravel UUID
Toggle sidebar
Laravel UUID
webpatser/laravel-uuid 9.0.0

Laravel UUID 9.x

Upgrade Guide

Upgrade Laravel UUID from 8.x to 9.x. webpatser/uuid 4.x is required and UUID v6 now follows the RFC 9562 field order.

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() and Str::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() in HasUuids and HasBinaryUuids) 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

  1. Update the package. This also moves webpatser/uuid to ^4.0:
composer require webpatser/laravel-uuid:^9.0
  1. If you required webpatser/uuid yourself, raise its constraint to ^4.0 (see the UUID 4.x upgrade guide).
  2. 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.