PHPackages                             lewiscowles/ulid - 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. lewiscowles/ulid

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lewiscowles/ulid
================

Universally Unique Lexicographically Sortable Identifier ported to PHP

1.3.1(1y ago)8438.4k↓28.3%5[4 issues](https://github.com/Lewiscowles1986/php-ulid/issues)1AGPL-3.0-or-laterPHPPHP &gt;=7.3CI passing

Since Aug 2Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Lewiscowles1986/php-ulid)[ Packagist](https://packagist.org/packages/lewiscowles/ulid)[ RSS](/packages/lewiscowles-ulid/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (11)Used By (1)

php-ulid
========

[](#php-ulid)

Universally Unique Lexicographically Sortable Identifier ported to PHP

[![PHP Composer](https://github.com/Lewiscowles1986/php-ulid/actions/workflows/php.yml/badge.svg?branch=main)](https://github.com/Lewiscowles1986/php-ulid/actions/workflows/php.yml)

Tests borrowed from [.NET port](https://github.com/fvilers/ulid.net)
Original idea borrowed from [JS](https://github.com/alizain/ulid)

License AGPL

Requirements
------------

[](#requirements)

PHP7.4+

Usage:
------

[](#usage)

`composer require lewiscowles/ulid`

Tests:
------

[](#tests)

To generate the coverage report xdebug extension must be enabled for your PHP

### Unit-test CLI

[](#unit-test-cli)

`php vendor/bin/phpunit --coverage-html ./reports/ --whitelist src`

### Mutation testing with infection

[](#mutation-testing-with-infection)

`php vendor/bin/infection`

### PHPStan

[](#phpstan)

`php vendor/bin/phpstan analyse src -l max`

### Jenkins pipeline step for testing

[](#jenkins-pipeline-step-for-testing)

```
    stage('Run Unit Tests in PHP') {
        dir('ulid') {
            sh 'php vendor/bin/phpunit --coverage-html ./reports/ --whitelist src'
        }
        publishHTML([allowMissing: true, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'ulid/reports', reportFiles: 'index.html', reportName: 'PHPUnit Coverage'])
    }
```

Got an idea?
------------

[](#got-an-idea)

Create an issue, a PR, both (if possible) 😸

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance60

Regular maintenance activity

Popularity42

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 82.5% 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 ~503 days

Recently: every ~722 days

Total

7

Last Release

558d ago

PHP version history (2 changes)1.2.1PHP &gt;=7.0

1.3.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/9311118828e6efd86d66a7ca0991ed23fa8f3dad550931b3a90d495cb582ca8a?d=identicon)[LewisCowles1986](/maintainers/LewisCowles1986)

---

Top Contributors

[![Lewiscowles1986](https://avatars.githubusercontent.com/u/2605791?v=4)](https://github.com/Lewiscowles1986 "Lewiscowles1986 (52 commits)")[![garak](https://avatars.githubusercontent.com/u/179866?v=4)](https://github.com/garak "garak (4 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

phpreference-implementationulid

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lewiscowles-ulid/health.svg)

```
[![Health](https://phpackages.com/badges/lewiscowles-ulid/health.svg)](https://phpackages.com/packages/lewiscowles-ulid)
```

###  Alternatives

[liaison/revision

Seamless software updates library for CodeIgniter4 projects.

186.4k1](/packages/liaison-revision)

PHPackages © 2026

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