PHPackages                             decodelabs/guidance - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. decodelabs/guidance

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

decodelabs/guidance
===================

Generalised UUID generation and parsing interface

v0.3.7(7mo ago)11.4k1MITPHPPHP ^8.4CI passing

Since Nov 14Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/decodelabs/guidance)[ Packagist](https://packagist.org/packages/decodelabs/guidance)[ RSS](/packages/decodelabs-guidance/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (31)Used By (1)

Guidance
========

[](#guidance)

[![PHP from Packagist](https://camo.githubusercontent.com/0830a5cca6a7babbc23a469c2e894fa67af7e11130e2a0282fcc37b610151b73/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6465636f64656c6162732f67756964616e63653f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/guidance)[![Latest Version](https://camo.githubusercontent.com/1b976068dc172c5a83b1545422251fccdac9134002ddb6394e0f9c7cfddf4b86/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465636f64656c6162732f67756964616e63652e7376673f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/guidance)[![Total Downloads](https://camo.githubusercontent.com/cc05ac897441b46746bcc2cfded68c52959e4e1f701ecb9b2c66ba131e7654f6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6465636f64656c6162732f67756964616e63652e7376673f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/guidance)[![GitHub Workflow Status](https://camo.githubusercontent.com/70fe46c4399e2598b1afe08a7afd64b6738722a14cc1eefad5510c9d747320fb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6465636f64656c6162732f67756964616e63652f696e746567726174652e796d6c3f6272616e63683d646576656c6f70)](https://github.com/decodelabs/guidance/actions/workflows/integrate.yml)[![PHPStan](https://camo.githubusercontent.com/e25c14ce011edabdd0fbd2e10415b41cc5d66ed11ef3e5b7edd074c5bdd35a2d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d3434434331312e7376673f6c6f6e6743616368653d74727565267374796c653d666c6174)](https://github.com/phpstan/phpstan)[![License](https://camo.githubusercontent.com/c414ff462f8336ecc6b68a940ae181e1309320929aba4d4922716c63793bb6b5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6465636f64656c6162732f67756964616e63653f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/guidance)

### Generalised UUID generation and parsing interface

[](#generalised-uuid-generation-and-parsing-interface)

Guidance provides a simplified interface for generating and parsing UUIDs of various types. It is designed to be used as a common interface for other libraries that need to work with UUIDs, without having to worry about the specifics of each type and implementation of the generator.

Guidance provides a stripped down front end over the [Ramsey UUID](https://uuid.ramsey.dev) library by default, but can be extended to support other implementations where required.

It also provides a simple interface for generating and parsing ULIDs, which are a more modern alternative to UUIDs.

---

Installation
------------

[](#installation)

This package requires PHP 8.4 or higher.

Install via Composer:

```
composer require decodelabs/guidance
```

Usage
-----

[](#usage)

```
use DecodeLabs\Guidance;
use DecodeLabs\Guidance\Uuid\Format;
use DecodeLabs\Monarch;

$guidance = Monarch::getService(Guidance::class);

// Generate a v4 UUID
$v4 = $guidance->createV4Uuid();
$version = $v4->version; // Version::V4

$string1 = (string)$v4; // Full UUID string
$string2 = $v4->shorten(Format::Base62); // Base 62 (default) encoded UUID
$string3 = $v4->shorten(Format::FlickrBase58); // Base 58 encoded UUID
echo $v4->bytes; // Raw bytes of the UUID

$new1 = $guidance->uuidFrom($string1); // Parse full UUID string
$new2 = $guidance->uuidFromShortString($string3, Format::FlickrBase58);

$ulid = $guidance->createUlid(); // Generate a ULID
echo $ulid->dateTime->format('Y-m-d H:i:s'); // Get the date and time from the ULID
```

Licensing
---------

[](#licensing)

Guidance is licensed under the MIT License. See [LICENSE](./LICENSE) for the full license text.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance69

Regular maintenance activity

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Recently: every ~3 days

Total

29

Last Release

220d ago

PHP version history (2 changes)v0.1.0PHP ^8.1

v0.1.13PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a241d64d12b3b5ee94197862ec1ec30b82ed2efa34a0cd7f4c3565a021daddd?d=identicon)[betterthanclay](/maintainers/betterthanclay)

---

Top Contributors

[![betterthanclay](https://avatars.githubusercontent.com/u/1273586?v=4)](https://github.com/betterthanclay "betterthanclay (119 commits)")

---

Tags

phpuuid

### Embed Badge

![Health badge](/badges/decodelabs-guidance/health.svg)

```
[![Health](https://phpackages.com/badges/decodelabs-guidance/health.svg)](https://phpackages.com/packages/decodelabs-guidance)
```

###  Alternatives

[brick/money

Money and currency library

1.9k37.9M102](/packages/brick-money)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

374468.4k51](/packages/flow-php-etl)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
