dekuan/dedid
dekuan/dedid is a PHP package for generating distributed, unique IDs. It provides a lightweight API for creating sortable identifiers across nodes or services, making it suitable for Laravel and other PHP applications that need collision-resistant IDs without central coordination.
uniqid()/microtime() calls into one reviewable mechanism.Consider it when all of the following hold:
Look elsewhere when:
pack() portability work, and zero CVE monitoring. If your policy requires a supported dependency, this fails it.auto_increment_increment/offset, or a managed ID service (e.g., cloud Snowflake-style generators) push the problem to infrastructure you already operate and patch.PM verdict to carry into planning: adopt the pattern, and treat dekuan/dedid as a reference implementation to fork or replace — not as a supported vendor dependency. Score 0.45 is a fair read: technically on-target, operationally risky.
To executives (30 seconds): We will eventually need primary keys that can be generated independently on many servers and still sort correctly — that is a prerequisite for sharding and multi-region writes. The established approach is cheap and well understood. The specific PHP library that implements it is small, permissively licensed (Apache-2.0), and unmaintained since 2017, so my recommendation is to adopt the approach using a maintained implementation or a small internal fork, not to take a dependency on this package. Cost is days, not weeks; the schedule risk sits with the sharding milestone, not with this library.
To engineering:
To security/compliance: sequential IDs are enumerable and reveal creation order and rough volume. Acceptable for internal keys; requires a separate external identifier for customer-facing resources. An unmaintained dependency also has no security-response path — another reason to fork-and-own rather than consume directly.
How can I help you explore Laravel packages today?