lewiscowles/ulid

Universally Unique Lexicographically Sortable Identifier ported to PHP


Keywords
php, reference-implementation, ulid
License
AGPL-3.0

Documentation

php-ulid

Universally Unique Lexicographically Sortable Identifier ported to PHP

travis ci build status

Tests borrowed from .NET port
Original idea borrowed from JS

License AGPL

Requirements

PHP7

Usage:

composer require lewiscowles/ulid

Tests:

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

CLI

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

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?

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