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)8440.4k↓60.9%5[4 issues](https://github.com/Lewiscowles1986/php-ulid/issues)1AGPL-3.0-or-laterPHPPHP &gt;=7.3CI failing

Since Aug 2Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/Lewiscowles1986/php-ulid)[ Packagist](https://packagist.org/packages/lewiscowles/ulid)[ RSS](/packages/lewiscowles-ulid/feed)WikiDiscussions main Synced 2d 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

48

—

FairBetter than 93% of packages

Maintenance55

Moderate activity, may be stable

Popularity42

Moderate usage in the ecosystem

Community18

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

604d 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

[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.5M28](/packages/rubix-ml)[execut/yii2-widget-bootstraptreeview

Bootstrap Tree View widget wrapper for yii2

47175.5k](/packages/execut-yii2-widget-bootstraptreeview)

PHPackages © 2026

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