PHPackages                             flametrench/ids - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. flametrench/ids

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

flametrench/ids
===============

Prefixed wire-format IDs for Flametrench. UUIDv7 storage, self-describing public identifiers.

v0.2.0(1mo ago)01758Apache-2.0PHPPHP ^8.3CI passing

Since Apr 24Pushed 2d agoCompare

[ Source](https://github.com/flametrench/ids-php)[ Packagist](https://packagist.org/packages/flametrench/ids)[ Docs](https://github.com/flametrench/laravel)[ RSS](/packages/flametrench-ids/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (2)Versions (7)Used By (8)

flametrench/ids
===============

[](#flametrenchids)

[![CI](https://github.com/flametrench/ids-php/actions/workflows/ci.yml/badge.svg)](https://github.com/flametrench/ids-php/actions/workflows/ci.yml)

Prefixed wire-format identifiers for [Flametrench](https://github.com/flametrench/spec).

```
use Flametrench\Ids\Id;

Id::generate('usr');
// → "usr_0190f2a81b3c7abc8123456789abcdef"

Id::encode('org', '0190f2a8-1b3c-7abc-8123-456789abcdef');
// → "org_0190f2a81b3c7abc8123456789abcdef"

Id::decode('usr_0190f2a81b3c7abc8123456789abcdef');
// → ['type' => 'usr', 'uuid' => '0190f2a8-1b3c-7abc-8123-456789abcdef']

Id::isValid('usr_0190f2a81b3c7abc8123456789abcdef');           // true
Id::isValid('usr_0190f2a81b3c7abc8123456789abcdef', 'org');    // false
```

Why prefixed IDs
----------------

[](#why-prefixed-ids)

Flametrench uses UUIDv7 in storage and prefixed strings on the wire. The wire format is self-describing: `usr_...` is a user, `org_...` is an organization, `ses_...` is a session. This is the Stripe playbook, and it pays off in every log line, support ticket, and debugger session.

The specification details live at [flametrench/spec/docs/ids.md](https://github.com/flametrench/spec/blob/main/docs/ids.md). Implementations in other languages follow the same format.

Install
-------

[](#install)

```
composer require flametrench/ids
```

Requires PHP 8.3 or newer. Ships with a dependency on `symfony/uid` for UUID handling.

Registered type prefixes
------------------------

[](#registered-type-prefixes)

The specification reserves the following prefixes:

PrefixResourceSpec version`usr`Userv0.1`org`Organizationv0.1`mem`Membershipv0.1`inv`Invitationv0.1`ses`Sessionv0.1`cred`Credentialv0.1`tup`Authorization tuplev0.1`mfa`MFA factorv0.2`shr`Share tokenv0.2Implementations must not invent prefixes outside the specification. New prefixes are added through the specification's RFC process.

Testing
-------

[](#testing)

```
composer install
composer test
```

The package uses PEST. The test suite covers encoding, decoding, validation, generation, round-trip properties, and sortability of generated IDs.

License
-------

[](#license)

Apache License 2.0. Copyright 2026 NDC Digital, LLC.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance96

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity43

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

Every ~1 days

Total

5

Last Release

43d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19826928?v=4)[Nathan Call](/maintainers/nathancall)[@nathancall](https://github.com/nathancall)

---

Top Contributors

[![nathancall](https://avatars.githubusercontent.com/u/19826928?v=4)](https://github.com/nathancall "nathancall (13 commits)")

---

Tags

uuididentifieriduuidv7flametrench

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/flametrench-ids/health.svg)

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

###  Alternatives

[ramsey/uuid

A PHP library for generating and working with universally unique identifiers (UUIDs).

12.6k729.6M3.8k](/packages/ramsey-uuid)[pascaldevink/shortuuid

PHP 7.4+ library that generates concise, unambiguous, URL-safe UUIDs

5941.8M16](/packages/pascaldevink-shortuuid)[keiko/uuid-shortener

A simple shortener library for RFC 4122 compatible UUIDs. Change your 36 chars long UUID into it's shorter equivalent.

150223.6k3](/packages/keiko-uuid-shortener)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[identifier/identifier

Common Interfaces and Factories for Identifiers

3231.4k1](/packages/identifier-identifier)[pugx/shortid-php

An implementation of shortid in PHP

52606.9k3](/packages/pugx-shortid-php)

PHPackages © 2026

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