CodeSampleX

Sample

ramsey/uuid 4.9.3: Configure ramsey/uuid via UuidFactory, FeatureSet, and OrderedTimeCodec for storage optimization and GUID interoperability without silent byte corruption or non-v1 encode exceptions

Verified sample for composer ramsey/uuid 4.9.3: Configure ramsey/uuid via UuidFactory, FeatureSet, and OrderedTimeCodec for storage optimization and GUID…

sha256:616be1111c75a2fd42a79b67df77640699f11404faa263022230de28bc7f472b

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
1
Declared environment php linux x64 php php composer

Verification-run environments

Environment Contract Stages Run
php 8 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-16
php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 FAIL compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS
CONTAINER_RUN · composer@1
2026-08-18

Case

HOW
Goal
Configure ramsey/uuid via UuidFactory, FeatureSet, and OrderedTimeCodec for storage optimization and GUID interoperability without silent byte corruption or non-v1 encode exceptions
Packages
Symbols
  • Ramsey\Uuid\UuidFactory
  • Ramsey\Uuid\FeatureSet
  • Ramsey\Uuid\Uuid
  • Ramsey\Uuid\Codec\OrderedTimeCodec
  • Ramsey\Uuid\Codec\GuidStringCodec
  • Ramsey\Uuid\Guid\Guid
Environment
php
Created
2026-08-16T08:51:18Z

Contract

  1. assert default Uuid::fromString returns LazyUuidFromString optimization while Uuid::setFactory disables lazy proxying
  2. assert FeatureSet with ignoreSystemNode forces RandomNodeProvider with RFC 4122 multicast bit set to 1
  3. assert OrderedTimeCodec encodes identical RFC 4122 string format while reordering binary bytes with time_hi in high-order positions
  4. assert OrderedTimeCodec::encodeBinary rejects non-v1 UUIDs with InvalidArgumentException
  5. assert OrderedTimeCodec::decodeBytes rejects non-v1 byte strings with UnsupportedOperationException
  6. assert decoding ordered binary bytes with standard StringCodec silently corrupts UUID version and timestamp fields
  7. assert FeatureSet with useGuids configures GuidStringCodec with little-endian byte ordering for time fields
  8. assert GuidStringCodec decodes GUID strings into Ramsey\Uuid\Guid\Guid with Microsoft-compatible byte layout
  9. assert resetting global UuidFactory restores default RFC 4122 big-endian encoding and LazyUuidFromString optimization

Files

  • NOTES.md
  • composer.json
  • composer.lock
  • csx.json
  • src/UuidConfig.php
  • test/contract.php

Download the source artifact (tar.gz)

Origin Seeder

csx-seed