Skip to main content

UUID Package Overview

The DomainFlow\Uuid package provides a structured, type-safe, and version-aware system for generating, validating, and inspecting UUIDs across multiple RFC-compliant versions.

✨ Features

  • Support for all major UUID versions (v1 through v8)
  • Deterministic UUID generation (v3, v5)
  • Time-based and sortable UUIDs (v1, v6, v7)
  • Domain-specific UUIDv2 generation (UID/GID)
  • RFC 4122 variant detection and validation
  • Introspectable metadata with the Inspector class
  • Immutable, type-safe objects with interface contracts

UUID Implementations

Each UUID version has a corresponding final class:

  • UuidV1: Time-based, includes clock sequence and node
  • UuidV2: DCE Security version using UID/GID
  • UuidV3: Name-based (MD5)
  • UuidV4: Random-based
  • UuidV5: Name-based (SHA-1)
  • UuidV6: Sortable timestamp-based
  • UuidV7: Unix-time-based with random bits
  • UuidV8: Application-defined structure

Inspector

An analysis tool that:

  • Detects UUID version and variant
  • Extracts metadata depending on version
  • Handles relaxed format validation for inspection

This package ensures clean UUID handling with clarity and robustness, helping you integrate UUIDs seamlessly in your DomainFlow-based applications.