lewiscowles / ulid
Universally Unique Lexicographically Sortable Identifier ported to PHP
Installs: 29 083
Dependents: 1
Suggesters: 0
Security: 0
Stars: 79
Watchers: 2
Forks: 6
Open Issues: 4
Requires
- php: >=7.3
Requires (Dev)
- ext-xdebug: *
- infection/infection: *
- phpstan/phpstan: *
- phpunit/phpunit: ^8.0|^9
This package is not auto-updated.
Last update: 2024-12-21 00:51:53 UTC
README
Universally Unique Lexicographically Sortable Identifier ported to PHP
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) 😸