PHPackages                             lekoala/silverstripe-uuid - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lekoala/silverstripe-uuid

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

lekoala/silverstripe-uuid
=========================

Uuid data extension for SilverStripe

2.0.0(7mo ago)13.0k↓33.3%2MITPHPPHP ^8.3CI passing

Since Aug 1Pushed 7mo ago2 watchersCompare

[ Source](https://github.com/lekoala/silverstripe-uuid)[ Packagist](https://packagist.org/packages/lekoala/silverstripe-uuid)[ GitHub Sponsors](https://github.com/lekoala)[ RSS](/packages/lekoala-silverstripe-uuid/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (14)Used By (0)

SilverStripe Uuid module
========================

[](#silverstripe-uuid-module)

[![Build Status](https://github.com/lekoala/silverstripe-uuid/actions/workflows/ci.yml/badge.svg)](https://github.com/lekoala/silverstripe-uuid/actions)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ac4001d357b4c68d66ec3e52c327ad01e5d02ae58b61f417d5a2468939b817a4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c656b6f616c612f73696c7665727374726970652d757569642f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lekoala/silverstripe-uuid/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/8165c91b6f01003a679083dd22ed689556280850f4542fdffda47279879d706e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c656b6f616c612f73696c7665727374726970652d757569642f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lekoala/silverstripe-uuid/?branch=master)[![Build Status](https://camo.githubusercontent.com/2d4a8d92d9a73dae4f7feeca733da89dc33c9cae990fdce62a87dce32c98019d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c656b6f616c612f73696c7665727374726970652d757569642f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lekoala/silverstripe-uuid/build-status/master)[![codecov.io](https://camo.githubusercontent.com/e2acf6367ff1b644bc65a8d70b67d9cb5653f9651a795c3e5357fc62fe8a8a3d/68747470733a2f2f636f6465636f762e696f2f6769746875622f6c656b6f616c612f73696c7665727374726970652d757569642f636f7665726167652e7376673f6272616e63683d6d6173746572)](https://codecov.io/github/lekoala/silverstripe-uuid?branch=master)

[![Latest Stable Version](https://camo.githubusercontent.com/59ab523eef51676eedbb041b81ec2c091ab2efa7b5340db69dea7aabd0fa4d6b/68747470733a2f2f706f7365722e707567782e6f72672f6c656b6f616c612f73696c7665727374726970652d757569642f76657273696f6e)](https://packagist.org/packages/lekoala/silverstripe-uuid)[![Latest Unstable Version](https://camo.githubusercontent.com/f628031e78842ced46ff64956bfbb95045d4682765b29b9804be7a9c1f1f6f21/68747470733a2f2f706f7365722e707567782e6f72672f6c656b6f616c612f73696c7665727374726970652d757569642f762f756e737461626c65)](//packagist.org/packages/lekoala/silverstripe-uuid)[![Total Downloads](https://camo.githubusercontent.com/5e90dae457bc13e6f105450fd97dfe1f5d9c65330d06ee5667d2b19cbdbabee6/68747470733a2f2f706f7365722e707567782e6f72672f6c656b6f616c612f73696c7665727374726970652d757569642f646f776e6c6f616473)](https://packagist.org/packages/lekoala/silverstripe-uuid)[![License](https://camo.githubusercontent.com/fafbcf26b03ece548899f8f8a30ea6e8d69f071b30eb0c6a1469c84d5e5c666d/68747470733a2f2f706f7365722e707567782e6f72672f6c656b6f616c612f73696c7665727374726970652d757569642f6c6963656e7365)](https://packagist.org/packages/lekoala/silverstripe-uuid)[![Monthly Downloads](https://camo.githubusercontent.com/f987f8db34aab0a95172aa2aecf0a3ef0efb136a75884d020e889d974330d4ef/68747470733a2f2f706f7365722e707567782e6f72672f6c656b6f616c612f73696c7665727374726970652d757569642f642f6d6f6e74686c79)](https://packagist.org/packages/lekoala/silverstripe-uuid)[![Daily Downloads](https://camo.githubusercontent.com/81f9ab431a067e47e855afd89c8b75a399983e5f4011b1dbbe4595ff66022cce/68747470733a2f2f706f7365722e707567782e6f72672f6c656b6f616c612f73696c7665727374726970652d757569642f642f6461696c79)](https://packagist.org/packages/lekoala/silverstripe-uuid)

Easily add uuid to your DataObjects

Getting started
===============

[](#getting-started)

Simply add the extension to your DataObject

```
MyDataObject:
  extensions:
    - LeKoala\Uuid\UuidExtension
```

Call `UuidExtension::getByUuid(MyDataObject::class, $uuid)` to retrieve the record by Uuid. Since that's really ugly, you can also use the `HasUuid` trait on your classes to return a properly type hinted class.

Usage in templates
==================

[](#usage-in-templates)

In your templates, use UuidSegment to ensure Uuid value is generated on the record. UuidSegment are base62 encoded in order to be shorter and more readable.

Getting readable values
=======================

[](#getting-readable-values)

Since Uuid's are stored in binary format for performance reason, you need to call $myObject-&gt;dbObject('Uuid')-&gt;Nice() to get a readable value.

Populate Uuids of existing DataObjects
======================================

[](#populate-uuids-of-existing-dataobjects)

Apply the `PrepopulateUuidExtension` to have Uuids for existing DataObjects generated on `dev/build`.

```
MyUuidDataObject:
  extensions:
    - LeKoala\Uuid\PrepopulateUuidExtension
```

Upgrade to Ramsey v4
====================

[](#upgrade-to-ramsey-v4)

If you happen to upgrade from previous versions you might want to check [this guide](https://uuid.ramsey.dev/en/latest/upgrading/3-to-4.html)

TODO
====

[](#todo)

- Postgres compat

Worth reading
=============

[](#worth-reading)

[Storing UUID Values in MySQL](https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/)[GUID/UUID Performance](https://mariadb.com/kb/en/guiduuid-performance/)[Laravel: The mysterious “Ordered UUID”](https://itnext.io/laravel-the-mysterious-ordered-uuid-29e7500b4f8): offer a good overview of the situation although it's a bit laravel specific

Compatibility
=============

[](#compatibility)

Tested with SilverStripe 6 and up

For 4.x and 5.x, see branch 1

Maintainer
==========

[](#maintainer)

LeKoala -

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance63

Regular maintenance activity

Popularity24

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 92.3% 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 ~217 days

Recently: every ~141 days

Total

13

Last Release

236d ago

Major Versions

1.x-dev → 2.0.02025-09-19

PHP version history (5 changes)1.0.0PHP ~7

1.0.4PHP &gt;=7.2

1.1.0PHP ^7.4 || ^8.0

1.1.2PHP ^7.4 || ^8

2.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/701d0bd1837aa291814dafee750a02471e7e0d20749626350231ffd3bfec0ec1?d=identicon)[lekoala](/maintainers/lekoala)

---

Top Contributors

[![lekoala](https://avatars.githubusercontent.com/u/250762?v=4)](https://github.com/lekoala "lekoala (60 commits)")[![micschk](https://avatars.githubusercontent.com/u/1005986?v=4)](https://github.com/micschk "micschk (2 commits)")[![GuySartorelli](https://avatars.githubusercontent.com/u/36352093?v=4)](https://github.com/GuySartorelli "GuySartorelli (1 commits)")[![mlewis-everley](https://avatars.githubusercontent.com/u/687143?v=4)](https://github.com/mlewis-everley "mlewis-everley (1 commits)")[![wilr](https://avatars.githubusercontent.com/u/101629?v=4)](https://github.com/wilr "wilr (1 commits)")

---

Tags

silverstripesilverstripe-moduleuuidsilverstripeuuidmodule

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lekoala-silverstripe-uuid/health.svg)

```
[![Health](https://phpackages.com/badges/lekoala-silverstripe-uuid/health.svg)](https://phpackages.com/packages/lekoala-silverstripe-uuid)
```

###  Alternatives

[silverstripers/seo

SEO for SilverStripe websites

1144.3k](/packages/silverstripers-seo)[webtorque7/inpage-modules

Adds module blocks to a SilverStripe website.

191.3k](/packages/webtorque7-inpage-modules)[richardsjoqvist/silverstripe-embedder

Embedder enables embedding media in content fields area similar to how embeds work in WordPress

112.6k](/packages/richardsjoqvist-silverstripe-embedder)

PHPackages © 2026

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