not-empty/ulid-php-lib
A small PHP library for generating ULIDs—universally unique, lexicographically sortable identifiers combining a timestamp with random data. Provides simple APIs for creating, parsing, and validating ULIDs, making them a good fit for database keys and sortable IDs.
created_at index.Str::ulid() natively (Laravel 9+). That makes this a "buy" candidate only for non-Laravel PHP services, legacy framework versions, or needs beyond generation (parsing, validation, timestamp extraction, monotonic-within-millisecond generation, ULID↔UUID conversion).Consider it only if several of these hold:
Str::ulid() isn't available.symfony/uid for a single function.Look elsewhere if:
Str::ulid(); zero dependency, zero license surface.symfony/uid (MIT) covers ULID, UUIDv4/v6/v7/v8, and is backed by a large maintainer base.ramsey/uuid (MIT).For executives (one paragraph): We're standardizing on sortable, non-sequential public identifiers for [orders / API resources / events]. ULIDs improve index performance versus random UUIDs and remove the enumeration risk of auto-increment IDs. However, Laravel already provides ULID generation natively, so the default recommendation is to use the framework and add no new dependency. This third-party library is a fallback for non-Laravel services or advanced parsing needs. It is small and low-cost, but it is a 21-star, single-maintainer project under GPL-3.0 — a copyleft license that can create obligations if we distribute software. Recommendation: no adoption without a legal ruling, and no adoption at all where the framework already covers us.
For engineering: Treat this as a narrowly-scoped utility, not an ID platform. If adopted, wrap it behind our own IdGenerator / IdParser interface so it's swappable for Str::ulid() or symfony/uid in a one-file change. Never let the raw package API leak into domain code or API contracts, and never persist ULIDs as VARCHAR without confirming binary/CHAR(26) or uuid-column tradeoffs with the DBA. Validate any client-supplied ULID at the boundary.
Ask being made: Approval to (1) standardize on ULIDs for [specific entity list], (2) use Str::ulid() as the implementation, and (3) hold this package as a documented fallback pending legal review of GPL-3.0. Decision owner: [Architecture/Platform lead]; legal sign-off: [Legal]; revisit only if a non-Laravel service or advanced parsing need materializes.
How can I help you explore Laravel packages today?