PHPackages                             josbeir/cakephp-uid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. josbeir/cakephp-uid

ActiveCakephp-plugin[Database &amp; ORM](/categories/database)

josbeir/cakephp-uid
===================

CakePHP plugin that provides various UID types for the ORM

1.02(9mo ago)090MITPHPPHP &gt;=8.2CI passing

Since Aug 9Pushed 8mo agoCompare

[ Source](https://github.com/josbeir/cakephp-uid)[ Packagist](https://packagist.org/packages/josbeir/cakephp-uid)[ RSS](/packages/josbeir-cakephp-uid/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (3)Used By (0)

[![CI](https://github.com/josbeir/cakephp-uid/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/josbeir/cakephp-uid/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/218e3728ac11c97590db2c916a7dd5dc5a6437635bc63c62a960c44e763a73a1/68747470733a2f2f636f6465636f762e696f2f67682f6a6f73626569722f63616b657068702d7569642f67726170682f62616467652e7376673f746f6b656e3d43435839554946463238)](https://codecov.io/gh/josbeir/cakephp-uid)[![PHPStan](https://camo.githubusercontent.com/f60d96f7c2579690ab6dfa8918f777fe93a02a92301c661eb38a85861a92b780/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230382d627269676874677265656e2e7376673f7374796c653d666c6174)](https://phpstan.org/)[![Minimum PHP Version](https://camo.githubusercontent.com/ec21f169d70b69344c67d6f18fa1a24d20476d2f0cd680e8c4a1534c22f34e5f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e322d3838393242462e737667)](https://php.net/)[![Packagist Downloads](https://camo.githubusercontent.com/cb8dba85cfb5695f9efd79e6269ef7f86ca4fcbee106cb1f548ed24983d8029c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f73626569722f63616b657068702d756964)](https://packagist.org/packages/josbeir/cakephp-uid)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE.md)

CakePHP UID Plugin
==================

[](#cakephp-uid-plugin)

A CakePHP plugin providing a collection of UID field types for your applications.

You can follow ongoing discussion about native UID support on the official CakePHP issue tracker [here](https://github.com/cakephp/cakephp/issues/18807). This plugin provides a solution until more convenient support is available in CakePHP core.

Features
--------

[](#features)

- **UUIDv4** field type
- **UUIDv6** field type
- **UUIDv7** field type
- **ULID** field type

Easily add modern, sortable unique identifiers to your CakePHP models.

Installation
------------

[](#installation)

Install via Composer:

```
composer require josbeir/cakephp-uid
```

Usage
-----

[](#usage)

Before using the UID field types in your schema, you need to map them using `TypeFactory::map` in your application bootstrap or plugin initialization:

If you want to use these types instead of CakePHP's [native ones](https://book.cakephp.org/5/en/orm/database-basics.html#data-types), you need to override the original types as shown below. CakePHP will handle the rest based on your database field settings.

- For UUID: use column type `UUID` (when supported by your db) or `BINARY(16)` or `CHAR(36)`:
- FOR ULID: use column type `BINARY(16)` or `CHAR(26)`:
- Remember that a UUID/BINARY is prefererd for performance reasons.

```
TypeFactory::map('binaryuuid', BinaryUuidV7Type::class); // Uses UUID V7
TypeFactory::map('binaryuuid', BinaryUlidType::class); // Uses ULID
```

Other possibilities:

```
TypeFactory::map('uuidv4', UuidV4Type::class);
TypeFactory::map('uuidv6', UuidV6Type::class);
TypeFactory::map('uuidv7', UuidV7Type::class);
TypeFactory::map('ulid', UlidType::class);
TypeFactory::map('binaryuuidv4', BinaryUuidV4Type::class);
TypeFactory::map('binaryuuidv6', BinaryUuidV6Type::class);
TypeFactory::map('binaryuuidv7', BinaryUuidV7Type::class);
TypeFactory::map('binaryulid', BinaryUlidType::class);
```

Underlying Library
------------------

[](#underlying-library)

This plugin utilizes the [Symfony UID component](https://symfony.com/doc/current/components/uid.html) to generate, validate, and convert UIDs. Refer to the Symfony documentation for advanced usage and interoperability details.

License
-------

[](#license)

[MIT](LICENSE.md)

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance59

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

279d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2899d7bd057eecff34549480753213e1b19652f7f726db2d971b6b0fa69d4c14?d=identicon)[josbeir](/maintainers/josbeir)

---

Top Contributors

[![josbeir](https://avatars.githubusercontent.com/u/26058?v=4)](https://github.com/josbeir "josbeir (15 commits)")

---

Tags

ormcakephpuuidUIDulid

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/josbeir-cakephp-uid/health.svg)

```
[![Health](https://phpackages.com/badges/josbeir-cakephp-uid/health.svg)](https://phpackages.com/packages/josbeir-cakephp-uid)
```

###  Alternatives

[josegonzalez/cakephp-upload

CakePHP plugin to handle file uploading sans ridiculous automagic

5451.3M9](/packages/josegonzalez-cakephp-upload)[muffin/trash

Adds soft delete support to CakePHP ORM tables.

851.3M11](/packages/muffin-trash)[muffin/webservice

Simplistic webservices for CakePHP

88191.0k13](/packages/muffin-webservice)[admad/cakephp-sequence

Sequence plugin for CakePHP to maintain ordered list of records

46489.9k6](/packages/admad-cakephp-sequence)[riesenia/cakephp-duplicatable

CakePHP ORM plugin for duplicating entities (including related entities)

51384.5k4](/packages/riesenia-cakephp-duplicatable)[rorecek/laravel-ulid

Laravel package for ULID (Universally Unique Lexicographically Sortable Identifier)

52160.3k1](/packages/rorecek-laravel-ulid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
