Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,27 @@ benchmarks export-ignore
docs export-ignore
examples export-ignore
tests export-ignore
vendor export-ignore
graphify-out export-ignore
phpforge export-ignore
plans export-ignore
var export-ignore

.agents export-ignore
.aws export-ignore
.codex export-ignore
.idea export-ignore
.vscode export-ignore
.windsurf export-ignore
.psalm-cache export-ignore
.phpunit.cache export-ignore

.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.readthedocs.yaml export-ignore
captainhook.json export-ignore
composer.lock export-ignore
pest.xml export-ignore
phpbench.json export-ignore
phpcs.xml.dist export-ignore
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ All-in-one unique ID toolkit for PHP.

## Features

- UUID (`v1`, `v3`, `v4`, `v5`, `v6`, `v7`, `v8`)
- UUID (`v1`, `v2`, `v3`, `v4`, `v5`, `v6`, `v7`, `v8`)
- ULID (monotonic and random modes)
- Snowflake, Sonyflake, Randflake, TBSL
- TypeID, ObjectID, NanoID, RandomId, CUID2, KSUID, XID
Expand All @@ -21,7 +21,7 @@ All-in-one unique ID toolkit for PHP.
- Binary conversion and base encoders (`10`, `16`, `32`, `36`, `58`, `62`)
- Pluggable sequence providers (filesystem, memory, PSR-16 cache, callback)
- Explicit legacy/upstream Sonyflake and Randflake compatibility modes
- Optional PSR-20 clocks and Runwire 2.1.1+ cooperative wait integration
- Optional PSR-20 clocks and Runwire 3.0 cooperative wait integration

## Requirements

Expand Down
167 changes: 0 additions & 167 deletions benchmarks/ContentionMatrix.php

This file was deleted.

6 changes: 6 additions & 0 deletions benchmarks/HotspotBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ public function benchUlidRandom(): void
ULID::generateRandom();
}

#[Bench\Revs(1000), Bench\Iterations(5)]
public function benchUuidV2(): void
{
UUID::v2(1001);
}

#[Bench\Revs(1000), Bench\Iterations(5)]
public function benchUuidV4(): void
{
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"require-dev": {
"infocyph/phpforge": "dev-main@dev",
"infocyph/runwire": "^2.1.1",
"infocyph/runwire": "^3.0",
"psr/clock": "^1.0",
"psr/simple-cache": "^3.0"
},
Expand Down
109 changes: 0 additions & 109 deletions docs/benchmark-report.rst

This file was deleted.

5 changes: 4 additions & 1 deletion docs/compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Format Compatibility
--------------------

- UUID v1/v3/v4/v5 follows RFC 4122-compatible layouts; UUID v6/v7 follows RFC 9562.
- UUID v2 uses the DCE Security layout, including local identifier and domain fields.
- UUID v8 uses an application-defined payload. Generic parsing does not infer a timestamp.
- TypeID implements the TypeID v0.3 text format over 16 UUID bytes.
- ObjectID implements the BSON 12-byte ObjectID layout and canonical lowercase hexadecimal text.
Expand All @@ -26,6 +27,7 @@ Format Uniqueness model
===================== ==============================================================
UUID v4 Probabilistic cryptographic randomness
UUID v7 Randomness plus process-local monotonic generation
UUID v2 Random nodes by default; caller coordination for fixed nodes
ULID Randomness plus optional process-local monotonic generation
TypeID Inherits the encoded UUID's uniqueness properties
ObjectID Timestamp, process-random value, and process-local counter
Expand Down Expand Up @@ -54,6 +56,7 @@ UUID v4/v7 Identifiers, not authorization secrets
Snowflake/Sonyflake Structured values whose metadata may be inferred
TBSL Structured value whose timestamp is recoverable
ObjectID/XID/KSUID Timestamp metadata is recoverable
UUID v2 Local identity and coarse timestamp are recoverable
Randflake Obscures fields; it is not authenticated encryption
OpaqueId Reversible obfuscation only
DeterministicId Stable deterministic token; it does not provide secrecy
Expand All @@ -66,6 +69,6 @@ Runtime Requirements

- PHP 8.4 or newer on a 64-bit runtime.
- The ctype extension is required.
- Runwire 2.1.1+ and PSR-20 clocks are optional passed-instance integrations.
- Runwire 3.0 and PSR-20 clocks are optional passed-instance integrations.
- No BCMath dependency.
- PSR-16 is optional and needed only for the PSR simple-cache sequence provider.
6 changes: 3 additions & 3 deletions docs/framework-integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ application domain that owns their node/machine ID, epoch, sequence provider and
runtime policy. SnowflakeConfig, SonyflakeConfig, RandflakeConfig and TBSLConfig
may receive a GenerationContext without changing the ordinary synchronous APIs.

Runwire 2.1.1+ Integration
Runwire 3.0 Integration
--------------------------

Runwire support is optional. UID never discovers a runtime globally and never
Expand Down Expand Up @@ -58,8 +58,8 @@ operation.
Construct bindings after worker creation/fork and do not retain a request binding
in static provider selectors or worker-wide mutable state. The binding validates
the process, request/runtime identity, request completion, active coroutine
capability, cancellation and deadlines using Runwire 2.1.1 public APIs. UID's
development fixture targets ``infocyph/runwire ^2.1.1``.
capability, cancellation and deadlines using Runwire 3.0 public APIs. UID's
development fixture targets ``infocyph/runwire ^3.0``.

A CoroutineScope does not expose public request identity. Therefore the host
boundary that owns both objects is responsible for pairing the correct scope with
Expand Down
Loading
Loading