qlimix/uuid

Uuid value objects

Maintainers

Details

github.com/qlimix/uuid

Source

Issues

Installs: 420

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/qlimix/uuid

2.0.1 2021-02-22 20:26 UTC

This package is auto-updated.

Last update: 2025-09-23 06:56:27 UTC


README

Travis CI Coveralls Packagist MIT License

A Uuid value object and an interface to generate an uuid.

Install

Using Composer:

$ composer require qlimix/uuid

usage

<?php

use Qlimix\Id\Uuid\Uuid;

$uuid = new Uuid('ecf72764-f657-4ae9-9183-135b72bbad32');
$uuid2 = new Uuid('ecf72764-f657-4ae9-9183-135b72bbad32');

$bytes = $uuid->getBytes();
$string = $uuid->toString();

$uuid = Uuid::fromBytes($bytes);

if ($uuid->equals($uuid2)) {
    // the same
}

Testing

To run all unit tests locally with PHPUnit:

$ vendor/bin/phpunit

Quality

To ensure code quality run grumphp which will run all tools:

$ vendor/bin/grumphp run

Contributing

Please see CONTRIBUTING for details.