I think I’m finally ready to release an alpha version of the ramsey/identifier library, after several years of letting it stew (first commit was Sep 2022). I just need to get over the hump of filling in the README and writing the docs, now.

https://github.com/ramsey/identifier

GitHub - ramsey/identifier: A PHP library for generating and working with identifiers, including UUIDs, ULIDs, and Snowflakes

A PHP library for generating and working with identifiers, including UUIDs, ULIDs, and Snowflakes - ramsey/identifier

GitHub
@ramsey This replaces ramsey/uuid?
@Crell I don’t want to say I won’t support ramsey/uuid anymore, but yeah, this can replace it. What it really does is provides a proving ground for identifier/identifier. If it seems like a useful idea, I’ll propose it to PHP-FIG. https://github.com/php-identifier/identifier
GitHub - php-identifier/identifier: Common interfaces for identifiers

Common interfaces for identifiers. Contribute to php-identifier/identifier development by creating an account on GitHub.

GitHub
@ramsey @Crell this would be great.
@chris @Crell Do you happen to have any use-cases you can share that make it particularly great for your needs? I’d love to add some more examples for why it’s beneficial.

@ramsey @Crell we use https://github.com/glhd/bits in Verbs, but if there were an canonical way to do snowflakes that would be even better.

(Although we’re very likely to switch from snowflakes to UUIDv7 before tagging 1.0. Snowflakes and JS are just too much of a headache, and they’re less convenient in the world of cloud computing when you don’t necessarily have known workers.)

GitHub - glhd/bits

Contribute to glhd/bits development by creating an account on GitHub.

GitHub