Skip to content

Universally Unique Lexicographically Sortable Identifier ported to PHP

License

Notifications You must be signed in to change notification settings

Lewiscowles1986/php-ulid

Repository files navigation

php-ulid

Universally Unique Lexicographically Sortable Identifier ported to PHP

PHP Composer

Tests borrowed from .NET port
Original idea borrowed from JS

License AGPL

Requirements

PHP7.4+

Usage:

composer require lewiscowles/ulid

Tests:

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

Unit-test CLI

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

Mutation testing with infection

php vendor/bin/infection

PHPStan

php vendor/bin/phpstan analyse src -l max

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) 😸

About

Universally Unique Lexicographically Sortable Identifier ported to PHP

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages