Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Uuid Laravel Package

ramsey/uuid

Generate and work with UUIDs in PHP using ramsey/uuid. Create v1, v4, and other UUID types, parse and validate UUID strings, and integrate easily via Composer. Well-documented, widely used, and standards-aware for reliable identifiers.

View on GitHub
Deep Wiki
Context7
4.9.2

Fixed

  • Remove explicit (int) cast to avoid float-string cast warnings in PHP 8.5.
  • Bump the lowest supported version of brick/math to ^0.8.16 from ^0.8.8. ramsey/uuid had been using BigInteger::toBytes() in UnixTimeGenerator (for version 7 UUIDs) since v4.6.0, but it wasn't added to brick/math until v0.8.16.

Full Changelog: https://github.com/ramsey/uuid/compare/4.9.1...4.9.2

4.9.1

Fixed

  • Allow brick/math version ^0.14; fixed in #617.
  • Default to microtime() instead of DateTimeImmutable in Ramsey\Uuid\Generator\UnixTimeGenerator.

New Contributors

Full Changelog: https://github.com/ramsey/uuid/compare/4.9.0...4.9.1

4.9.0

Added

  • Add new [@pure](https://github.com/pure) annotations to the following (#605):
    • Ramsey\Uuid\Codec\CodecInterface::encode()
    • Ramsey\Uuid\Codec\CodecInterface::encodeBinary()
    • Ramsey\Uuid\Codec\CodecInterface::decode()
    • Ramsey\Uuid\Codec\CodecInterface::decodeBytes()
    • Ramsey\Uuid\Fields\FieldsInterface::getBytes()
    • Ramsey\Uuid\Math\CalculatorInterface::add()
    • Ramsey\Uuid\Math\CalculatorInterface::subtract()
    • Ramsey\Uuid\Math\CalculatorInterface::multiply()
    • Ramsey\Uuid\Math\CalculatorInterface::divide()
    • Ramsey\Uuid\Math\CalculatorInterface::fromBase()
    • Ramsey\Uuid\Math\CalculatorInterface::toBase()
    • Ramsey\Uuid\Math\CalculatorInterface::toHexadecimal()
    • Ramsey\Uuid\Math\CalculatorInterface::toInteger()
    • Ramsey\Uuid\Nonstandard\Uuid
    • Ramsey\Uuid\Rfc4122\Fields::isMax()
    • Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()
    • Ramsey\Uuid\Rfc4122\FieldsInterface::isNil()
    • Ramsey\Uuid\Type\Time::getSeconds()
    • Ramsey\Uuid\Type\Time::getMicroseconds()
    • Ramsey\Uuid\Type\TypeInterface::toString()
    • Ramsey\Uuid\UuidInterface::getBytes()
    • Ramsey\Uuid\UuidInterface::toString()
    • Ramsey\Uuid\Validator\ValidatorInterface::validate()

Fixed

  • Restore the [@pure](https://github.com/pure) annotations that were removed in 4.8.0 (#603).

Full Changelog: https://github.com/ramsey/uuid/compare/4.8.1...4.9.0

4.8.1

Fixed

  • This tagged release ensures the stable documentation build matches the current stable release.

Full Changelog: https://github.com/ramsey/uuid/compare/4.8.0...4.8.1

4.8.0

Deprecated

The following will be removed in ramsey/uuid 5.0.0:

  • Ramsey\Uuid\Codec\OrderedTimeCodec is deprecated; please migrate to version 6 UUIDs.
  • Ramsey\Uuid\Codec\TimestampFirstCombCodec is deprecated; please migrate to version 7 UUIDs.
  • Ramsey\Uuid\Codec\TimestampLastCombCodec is deprecated; please use Ramsey\Uuid\Codec\StringCodec instead.
  • Ramsey\Uuid\Generator\CombGenerator is deprecated; please migrate to version 7 UUIDs.

Fixed

  • Allow brick/math version ^0.13; fixed in #589.
  • Update call to str_getcsv() to avoid deprecation notice in PHP 8.4; fixed in #590.
  • Hexadecimal is never an empty string; fixed in #593.
  • Update docblocks for Uuid::fromBytes(), Uuid::fromString(), Uuid::fromDateTime(), Uuid::fromHexadecimal(), and Uuid::fromInteger() to note that each can throw InvalidArgumentException, addressing PHPStan errors occurring at call sites; fixed in #552.
  • getVariant() for MaxUuid now correctly returns Uuid::RESERVED_FUTURE, as specified in RFC 9562, section 5.10.
  • getVariant() for NilUuid now correctly returns Uuid::RESERVED_NCS, as specified in RFC 9562, section 5.9.

New Contributors

Full Changelog: https://github.com/ramsey/uuid/compare/4.7.6...4.8.0

4.7.6

Fixed

  • Allow brick/math version ^0.12.
4.7.5

Fixed

  • Protect against UUIDv7 collisions within the same millisecond, as reported in #518 and fixed in #522.
  • Improve the return type hint for UuidInterface::compareTo().
4.7.4

Fixed

  • Allow brick/math version ^0.11.
  • Add explicit Stringable interface to UuidInterface.
  • Fix namespace conflict reported in #490.
  • Fix unserialize error with OrderedTimeCodec reported in #494.
4.7.3

Fixed

  • The original 4.7.2 tag accidentally pointed to a commit in the 5.x branch. I have replaced the 4.7.2 tag with a new tag that points to the correct commit, but I am creating this tag to help notify users and automated processes who might have already updated to the bad 4.7.2 tag (#487).
4.7.2

Fixed

  • Amend Psalm assertion syntax on Uuid::isValid() to prevent incorrect type inference (#486).
  • Re-tagged with the correct commit hash, since the first tag was pointing to a commit in the 5.x branch (#487).
4.7.1

Fixed

  • Allow the use of ramsey/collection ^2.0 with ramsey/uuid.
4.7.0

Added

  • Add Uuid::fromHexadecimal() and UuidFactory::fromHexadecimal(). These methods are not required by the interfaces.

Fixed

  • Ignore MAC addresses consisting of all zeroes (i.e., 00:00:00:00:00:00).
3.9.7

Fixed

  • Add #[ReturnTypeWillChange] to Uuid::jsonSerialize() method.
4.6.0

Added

  • Add support for version 8, custom UUIDs, as defined in draft-ietf-uuidrev-rfc4122bis-00, section 5.8. While still an Internet-Draft, version 8 is stable and unlikely to change in any way that breaks compatibility.
    • Use Ramsey\Uuid\Uuid::uuid8() to generate version 8 UUIDs.
    • Version 8 UUIDs are of type Ramsey\Uuid\Rfc4122\UuidV8.
    • The constant Ramsey\Uuid\Uuid::UUID_TYPE_CUSTOM exists for version 8 UUIDs.

Fixed

  • Ensure monotonicity of version 7 UUIDs.
4.5.1

Fixed

  • Update RFC 4122 validator to recognize version 6 and 7 UUIDs.
4.5.0

Added

  • Promote version 6, reordered time UUIDs from the Nonstandard namespace to the Rfc4122 namespace. Version 6 UUIDs are defined in New UUID Formats, section 5.1. While still an Internet-Draft version 6 is stable and unlikely to change in any way that breaks compatibility.
  • Add support for version 7, Unix Epoch time UUIDs, as defined in New UUID Formats, section 5.2. While still an Internet-Draft, version 7 is stable and unlikely to change in any way that breaks compatibility.
    • Use Ramsey\Uuid\Uuid::uuid7() to generate version 7 UUIDs.
    • Version 7 UUIDs are of type Ramsey\Uuid\Rfc4122\UuidV7.
    • The constant Ramsey\Uuid\Uuid::UUID_TYPE_UNIX_TIME exists for version 7 UUIDs.
  • Add Ramsey\Uuid\Converter\Time\UnixTimeConverter and Ramsey\Uuid\Generator\UnixTimeGenerator to support version 7 UUID generation.
  • Add support for max UUIDs through Ramsey\Uuid\Uuid::MAX and Ramsey\Uuid\Rfc4122\MaxUuid.

Changed

  • The lowest version of brick/math allowed is now ^0.8.8.

Deprecated

The following will be removed in ramsey/uuid 5.0.0:

  • Ramsey\Uuid\Nonstandard\UuidV6 is deprecated in favor of Ramsey\Uuid\Rfc4122\UuidV6.
  • Ramsey\Uuid\Uuid::UUID_TYPE_PEABODY; use Ramsey\Uuid\Uuid::UUID_TYPE_REORDERED_TIME instead.

Fixed

  • For Ramsey\Uuid\Uuid::isValid(), Psalm now asserts the UUID is a non-empty-string when it is valid.
  • Nil UUIDs are properly treated as RFC 4122 variants, and getVariant() now returns a 2 when called on a nil UUID.
4.4.0

Changed

  • Allow brick/math 0.10.
  • Remove dev dependency to moontoast/math.
  • Un-deprecate UuidInterface::getUrn().
4.3.1

Deprecated

The following will be removed in ramsey/uuid 5.0.0:

  • Ramsey\Uuid\Generator\RandomLibAdapter
4.3.0

Changed

  • Remove support for PHP 7.2, 7.3, and 7.4. This is not a BC break, since Composer will do the right thing for your environment and select a compatible version of this library.
  • Require ext-ctype extension. For applications that run in environments where the ext-ctype is not present, please require a polyfill, such as symfony/polyfill-ctype.
  • Use iterable<UuidBuilderInterface> instead of BuilderCollection types.
  • Use iterable<NodeProviderInterface> instead of NodeProviderCollection types.

Deprecated

The following will be removed in ramsey/uuid 5.0.0:

  • Ramsey\Uuid\Builder\BuilderCollection
  • Ramsey\Uuid\Provider\Node\NodeProviderCollection
  • Dependency on ramsey/collection

Fixed

  • Support valid UUIDs in uppercase in LazyUuidFromString.
4.2.3

Fixed

  • Switch back to ^8.0 in the PHP version requirement.
4.1.3

Fixed

  • Switch back to ^8.0 in the PHP version requirement.
4.0.3

Fixed

  • Switch back to ^8.0 in the PHP version requirement.
3.9.6

Fixed

  • Switch back to ^8.0 in the PHP version requirement.
4.2.2

Fixed

  • Indicate support for PHP 8.1, using ~8.1.0 to prevent installations on 8.2 until the library is ready.
4.1.2

Fixed

  • Lock 4.1.x to ~8.0.0 to indicate it does not support PHP 8.1.
4.0.2

Fixed

  • Lock 4.0.x to ~8.0.0 to indicate it does not support PHP 8.1.
3.9.5

Fixed

  • Indicate support for PHP 8.1, using ~8.1.0 to prevent installations on 8.2 until the library is ready.
4.2.1

Fixed

  • Fix soft BC break with Uuid::fromString() signature. The change from string to non-empty-string on the parameter annotation introduced a BC break for those using static analysis tools. This release reverts this change and provides an assertion to guard against empty strings. See ramsey/uuid#383.
4.2.0

Added

  • Add Ramsey\Uuid\Exception\UuidExceptionInterface for all ramsey/uuid exceptions to implement. See ramsey/uuid#340.

Fixed

3.9.4

Fixed

  • Allow installation of paragonie/random_compat v9.99.100 (for PHP 8 compatibility).
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport