vjik / uuid
UUID Helper
dev-master
2021-01-03 13:09 UTC
Requires
- php: ^7.4|^8.0
- ramsey/uuid: ^4.1
Requires (Dev)
- phpunit/phpunit: ^9.5
- roave/infection-static-analysis-plugin: ^1.6
- vimeo/psalm: ^4.3
This package is auto-updated.
Last update: 2024-10-29 06:06:06 UTC
README
The package provides UuidHelper
that has static methods to work with UUID.
Based on library ramsey/uuid.
Installation
The package could be installed with composer:
composer require vjik/uuid --prefer-dist
UuidHelper
usage
UuidHelper
methods are static so usage is like the following:
$bytes = \Vjik\Uuid\UuidHelper::convertStringToBytes('1f2d3897-a226-4eec-bd2c-d0145ef25df9');
Overall the helper has the following methods:
- generateTimestampFirstCombUuid4
- convertStringToBytes
- convertBytesToString
Testing
Unit testing
The package is tested with PHPUnit. To run tests:
./vendor/bin/phpunit
Mutation testing
The package tests are checked with Infection mutation framework with Infection Static Analysis Plugin. To run it:
./vendor/bin/roave-infection-static-analysis-plugin
Static analysis
The code is statically analyzed with Psalm. To run static analysis:
./vendor/bin/psalm
License
The UUID Helper is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.