cline/strongly-typed-id

Strongly-typed ID value objects for PHP with support for UUID, ULID, NanoID, GUID, Sqid, Hashids and Laravel integration
5,643
Install
composer require cline/strongly-typed-id
Latest Version:3.0.1
PHP:^8.5.0
License:MIT
Last Updated:Mar 19, 2026
Links: GitHub  ·  Packagist
Maintainer: faustbrian

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads


This library provides strongly-typed ID value objects for PHP 8.4+, designed to create type-safe entity identifiers with support for multiple ID generation strategies including UUID variants (v1, v3, v4, v5, v6, v7, v8), ULID, NanoID, GUID, Sqids, Hashids, Prefixed IDs (Stripe-style with configurable generators), Random String, and Random Bytes.

Requirements

Requires PHP 8.4+

Installation

composer require cline/strongly-typed-id

Documentation

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

The MIT License. Please see License File for more information.

Related Packages

rorecek/laravel-ulid

Laravel package for ULID (Universally Unique Lexicographically Sortable Identifi...

165,861 52
cline/morphism

Reusable polymorphic key mapping for Laravel packages

17,003 0
stevenmaguire/laravel-uuid-model

Create non-incrementing Laravel models whose primary key is a UUID

46 4
gstjohn/eloquent-uuids

Easily allow Laravel Eloquent models to utilize UUIDs as their primary key.

6 0