UUID value objects and generators for Componenta

Maintainers

Package info

github.com/componenta/uuid

pkg:composer/componenta/uuid

Statistics

Installs: 1

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-15 11:07 UTC

This package is auto-updated.

Last update: 2026-06-15 12:06:56 UTC


README

Compatibility DI provider for Ramsey UUID.

This package exists for projects that still need Ramsey's UuidFactoryInterface registered through Componenta configuration. New domain code should prefer componenta/identity and depend on Componenta\Identity\UuidInterface or Componenta\Identity\UuidFactoryInterface.

Installation

composer require componenta/uuid

Requirements

  • PHP 8.4+
  • ramsey/uuid
  • Componenta config/DI integration when used through a container

Related Packages

Package Why it matters here
ramsey/uuid This package registers Ramsey UuidFactoryInterface.
componenta/config ConfigProvider returns dependency metadata.
componenta/di Consumes the registered Ramsey UUID factory.
componenta/identity Preferred package for new Componenta UUID value objects and generators.

What It Provides

Componenta\Uuid\ConfigProvider registers Ramsey's UuidFactoryInterface factory:

use Componenta\Uuid\ConfigProvider;
use Ramsey\Uuid\UuidFactoryInterface;

$config = (new ConfigProvider())();
$factory = $config['dependencies']['factories'][UuidFactoryInterface::class];

$uuidFactory = $factory();

Boundary

The package does not define a Componenta UUID value object. It is a compatibility provider only. Prefer componenta/identity for framework-level identity contracts and domain UUID abstractions.