PHPackages                             componenta/identity - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. componenta/identity

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

componenta/identity
===================

Identity contracts and immutable identities for Componenta

v1.0.0(1mo ago)083MITPHPPHP ^8.4

Since Jun 16Pushed 1mo agoCompare

[ Source](https://github.com/componenta/identity)[ Packagist](https://packagist.org/packages/componenta/identity)[ RSS](/packages/componenta-identity/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (3)

Componenta Identity
===================

[](#componenta-identity)

UUID value objects and generators for domain identities.

Installation
------------

[](#installation)

```
composer require componenta/identity
```

The package declares `Componenta\Identity\ConfigProvider` in `extra.componenta.config-providers`. When `componenta/composer-plugin` is installed, the provider is added to the generated provider list automatically.

Requirements
------------

[](#requirements)

- PHP 8.4+
- 64-bit PHP runtime for `UuidFactory`

Related Packages
----------------

[](#related-packages)

PackageWhy it matters here`componenta/policy`Uses `IdentityInterface` for actors and owned resources.`componenta/cqrs``Operation` uses UUIDs as operation identifiers.`componenta/di`Registers `UuidFactoryInterface` through `ConfigProvider`.`componenta/uuid`Legacy Ramsey compatibility; new domain code should prefer this package.What It Provides
----------------

[](#what-it-provides)

- `UuidInterface`: minimal identity contract with string conversion and equality.
- `RfcUuidInterface`: UUID contract with `bytes`, `version`, and `variant` properties.
- `Uuid`: immutable RFC UUID value object backed by 16 raw bytes.
- `UuidFactoryInterface`: generation/from-bytes contract.
- `UuidFactory`: UUID v1, v3, v4, v5, v6, v7, and v8 generator.
- `UuidNamespace`: standard namespaces for name-based UUIDs.

UUID Value Object
-----------------

[](#uuid-value-object)

```
use Componenta\Identity\Uuid;

$uuid = Uuid::fromString('018f6d5d-3f7a-7a9b-8c2f-123456789abc');

$uuid->toString(); // 018f6d5d-3f7a-7a9b-8c2f-123456789abc
$uuid->bytes;      // 16-byte binary representation
$uuid->version;    // 7
$uuid->variant;    // UuidVariant::Rfc
```

`Uuid::fromString()` accepts uppercase input and normalizes output to lowercase canonical form.

Equality
--------

[](#equality)

```
$left = Uuid::fromString($id);
$right = Uuid::fromBytes($left->bytes);

$left->equals($right); // true
```

Domain code should usually depend on `UuidInterface`. Infrastructure that needs raw bytes or version inspection can depend on `RfcUuidInterface`.

UUID Factory
------------

[](#uuid-factory)

```
use Componenta\Identity\UuidFactory;
use Componenta\Identity\UuidGenerationVersion;
use Componenta\Identity\UuidNamespace;

$factory = new UuidFactory(UuidGenerationVersion::V7);

$id = $factory->generate();              // default version
$random = $factory->v4();                // random UUID
$ordered = $factory->v7();               // Unix timestamp UUID
$nameBased = $factory->v5(UuidNamespace::Dns, 'example.com');
```

Name-based UUIDs are deterministic for the same namespace and name.

DI Registration
---------------

[](#di-registration)

`ConfigProvider` registers `UuidFactoryInterface` as a factory returning `UuidFactory`.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance91

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

43d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20490712?v=4)[Andrey Shelamkoff](/maintainers/Shelamkoff)[@Shelamkoff](https://github.com/Shelamkoff)

---

Top Contributors

[![Shelamkoff](https://avatars.githubusercontent.com/u/20490712?v=4)](https://github.com/Shelamkoff "Shelamkoff (1 commits)")

### Embed Badge

![Health badge](/badges/componenta-identity/health.svg)

```
[![Health](https://phpackages.com/badges/componenta-identity/health.svg)](https://phpackages.com/packages/componenta-identity)
```

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)[firemultimedia/mautic-multi-captcha-bundle

This plugin brings Google's reCAPTCHA, hCaptcha, and Cloudflare Turnstile integration to mautic.

141.3k](/packages/firemultimedia-mautic-multi-captcha-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
