Upgrade#
3.x to 4.0#
In
UuidFactoryandUlidFactory:$clockon all methods was renamed to$timestampIn
UuidFactoryandSequenceFactoryfor UUIDv1, UUIDv2, UUIDv6$clockSequenceparam was added between$nodeand$timestamp/$clock
2.x to 3.0#
Interface changes:
Rfc4122Variant10xxUuidwas renamed toVariant10xxUuidand it no longer extendsRfc4122UuidUuidV2,UuidV6,UuidV7,UuidV8,MaxUuidno longer implementRfc4122UuidIf you strictly check for standard UUIDs, use
Rfc9562UuidUuidV2is no longer considered RFC-based UUID because neither RFC explains them
V3/V5 namespaces were moved to the
Arokettu\Uuid\Namespaces\UuidNamespaceenum:<?php // v2: use Arokettu\Uuid\UuidFactory; use Arokettu\Uuid\UuidNamespaces; $uuid = UuidFactory::v5(UuidNamespaces::url(), 'http://example.com'); var_dump($uuid->toString()); // 8c9ddcb0-8084-5a7f-a988-1095ab18b5df // v3: use Arokettu\Uuid\Namespaces\UuidNamespace; use Arokettu\Uuid\UuidFactory; $uuid = UuidFactory::v5(UuidNamespace::URL, 'http://example.com'); var_dump($uuid->toString()); // 8c9ddcb0-8084-5a7f-a988-1095ab18b5df
UuidV7Sequencerenamed toUuidV7ShortSequence
1.x to 2.0#
Deprecated interface was removed:
<?php use Arokettu\Uuid\Rfc4122Variant10xxUuid; use Arokettu\Uuid\Rfc4122Variant1Uuid if ($uuid instanceof Rfc4122Variant1Uuid) { // ... } // replace with if ($uuid instanceof Rfc4122Variant10xxUuid) { // ... }
Deprecated sequences were removed:
<?php use Arokettu\Uuid\SequenceFactory; use Arokettu\Uuid\UlidFactory; use Arokettu\Uuid\UuidFactory; // UUIDv7: $seq = UuidFactory::v7Sequence(); // replace with $seq = SequenceFactory::v7(); // ULID: $seq = UlidFactory::sequence(); // replace with $seq = SequenceFactory::ulid();