项目作者: Lewiscowles1986

项目描述 :
Universally Unique Lexicographically Sortable Identifier ported to PHP
高级语言: PHP
项目地址: git://github.com/Lewiscowles1986/php-ulid.git
创建时间: 2016-08-02T17:10:24Z
项目社区:https://github.com/Lewiscowles1986/php-ulid

开源协议:GNU Affero General Public License v3.0

下载


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

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

Got an idea?

Create an issue, a PR, both (if possible) :smile_cat: