Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
950f12c
build: require Runwire 4.0.1 for runtime integration QA
abmmhasan Nov 27, 2026
910563d
fix: resolve generator and runtime analysis contracts
abmmhasan Nov 27, 2026
95a4123
fix: document ID factory and configuration failure contracts
abmmhasan Nov 27, 2026
05ede26
fix: resolve sequence and binary codec analyzer contracts
abmmhasan Nov 27, 2026
acc1415
fix: complete UUID, TypeID and value-object contracts
abmmhasan Nov 27, 2026
d8ff6c1
fix: preserve exception API, repair benchmark contracts and expand ac…
abmmhasan Nov 27, 2026
d527f11
test: validate fixture boundaries and remove dynamic smoke include
abmmhasan Nov 27, 2026
e69e780
test: complete typed UUID, ULID and coordinated sequence fixtures
abmmhasan Nov 27, 2026
f50e61f
docs: declare generator and configuration exception contracts
abmmhasan Nov 27, 2026
564b8fa
docs: declare runtime and coordinated allocation failure contracts
abmmhasan Nov 27, 2026
2df8c51
docs: declare binary codec and locking failure contracts
abmmhasan Nov 27, 2026
e73d2a3
docs: complete UUID and value-object inheritance contracts
abmmhasan Nov 27, 2026
34fae2e
docs: complete helper and benchmark failure contracts
abmmhasan Nov 27, 2026
93e7bbd
docs: update Runwire integration and PHP 8.6 acceptance guidance
abmmhasan Nov 27, 2026
e202eaf
fix: correct fixture syntax and PER formatting after hosted QA
abmmhasan Nov 27, 2026
1d692ff
fix: propagate newly exposed runtime and generator exception contracts
abmmhasan Nov 27, 2026
1d9377b
fix: propagate codec and sequence provider exception contracts
abmmhasan Nov 27, 2026
e4e875f
fix: resolve remaining recorded test and value object findings
abmmhasan Nov 27, 2026
546d235
Fix QA resource ownership and remaining test type contracts
abmmhasan Nov 27, 2026
45821bc
Propagate codec and identifier exception contracts
abmmhasan Nov 27, 2026
4846ee9
Complete remaining sequence and UUID exception declarations
abmmhasan Nov 27, 2026
cd99e72
Document remaining transitive identifier and cache exceptions
abmmhasan Nov 27, 2026
875593f
fix: complete coordinated generator and codec exception contracts
abmmhasan Nov 27, 2026
53db407
fix: reject negative timestamps before cache sequence allocation
abmmhasan Nov 27, 2026
ca8b56f
fix: unify numeric conversion and finish analyzer fixture contracts
abmmhasan Nov 27, 2026
512aa7f
:sparkles: feat(config): share generation retry deadlines and normali…
abmmhasan Nov 27, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/release-acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.4", "8.5"]
php: ["8.4", "8.5", "8.6"]
steps:
- name: Checkout exact candidate
uses: actions/checkout@v7
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 3.0 cooperative wait integration
- Optional PSR-20 clocks and Runwire 4.0.1 cooperative wait integration

## Requirements

Expand Down Expand Up @@ -101,7 +101,7 @@ UID is protected by [PHPForge](https://github.com/infocyph/PHPForge), an automat
tests, static and taint analysis, dependency auditing, architecture checks, and release readiness. Automated controls reduce
risk but do not replace responsible disclosure or manual review.

Release acceptance also runs `php tests/smoke.php` with a production-only install on PHP 8.4 and 8.5.
Release acceptance also runs `php tests/smoke.php` with a production-only install on PHP 8.4, 8.5, and 8.6.
One 100-cycle pass covers every generator and supported format, checking valid output, sample uniqueness,
and relevant round trips. Long HTTP benchmarks and soak runs are not release gates.

Expand Down
54 changes: 54 additions & 0 deletions benchmarks/BaseCodecBench.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
use Infocyph\UID\Support\TypeIdCodec;
use PhpBench\Attributes as Bench;

/**
* PHPBench discovers this entry point by reflection.
* @api
*/
final class BaseCodecBench
{
/** @var array<int, string> */
Expand Down Expand Up @@ -41,42 +45,76 @@ public function __construct()
$this->typeIdEncoded = TypeIdCodec::encode($this->samples[16]);
}

/**
* @param array{length:int} $params
* @throws \InvalidArgumentException
* @throws \LogicException
*/
#[Bench\Revs(1000), Bench\Iterations(5), Bench\ParamProviders('provideLengths')]
public function benchBase16(array $params): void
{
BaseEncoder::encodeBytes($this->sample($params), 16);
}

/**
* @param array{length:int} $params
* @throws \InvalidArgumentException
* @throws \LogicException
*/
#[Bench\Revs(1000), Bench\Iterations(5), Bench\ParamProviders('provideLengths')]
public function benchBase32(array $params): void
{
BaseEncoder::encodeBytes($this->sample($params), 32);
}

/**
* @param array{length:int} $params
* @throws \InvalidArgumentException
* @throws \LogicException
*/
#[Bench\Revs(1000), Bench\Iterations(5), Bench\ParamProviders('provideLengths')]
public function benchBase36(array $params): void
{
BaseEncoder::encodeBytes($this->sample($params), 36);
}

/**
* @param array{length:int} $params
* @throws \InvalidArgumentException
* @throws \LogicException
*/
#[Bench\Revs(1000), Bench\Iterations(5), Bench\ParamProviders('provideLengths')]
public function benchBase58(array $params): void
{
BaseEncoder::encodeBytes($this->sample($params), 58);
}

/**
* @param array{length:int} $params
* @throws \InvalidArgumentException
* @throws \LogicException
*/
#[Bench\Revs(1000), Bench\Iterations(5), Bench\ParamProviders('provideLengths')]
public function benchBase62(array $params): void
{
BaseEncoder::encodeBytes($this->sample($params), 62);
}

/**
* @param array{length:int} $params
* @throws \InvalidArgumentException
* @throws \LogicException
*/
#[Bench\Revs(1000), Bench\Iterations(5), Bench\ParamProviders('provideLengths')]
public function benchDecimal(array $params): void
{
BaseEncoder::encodeBytes($this->sample($params), 10);
}

/**
* @param array{base:int,length:int} $params
* @throws \InvalidArgumentException
*/
#[Bench\Revs(250), Bench\Iterations(5), Bench\ParamProviders('provideBaseLengthPairs')]
public function benchDecode(array $params): void
{
Expand All @@ -87,24 +125,40 @@ public function benchDecode(array $params): void
);
}

/**
* @param array{length:int} $params
* @throws \InvalidArgumentException
* @throws \LogicException
*/
#[Bench\Revs(500), Bench\Iterations(5), Bench\ParamProviders('provideLengths')]
public function benchNumericFromBytes(array $params): void
{
NumericIdCodec::decimalFromBytes($this->sample($params), $params['length']);
}

/**
* @param array{length:int} $params
* @throws \InvalidArgumentException
*/
#[Bench\Revs(500), Bench\Iterations(5), Bench\ParamProviders('provideLengths')]
public function benchNumericToBytes(array $params): void
{
DecimalBytes::toFixedBytes($this->decimal[$params['length']], $params['length']);
}

/**
* @throws \InvalidArgumentException
*/
#[Bench\Revs(1000), Bench\Iterations(5)]
public function benchTypeIdDecode(): void
{
TypeIdCodec::decode($this->typeIdEncoded);
}

/**
* @throws \InvalidArgumentException
* @throws \LogicException
*/
#[Bench\Revs(1000), Bench\Iterations(5)]
public function benchTypeIdEncode(): void
{
Expand Down
Loading