symfony/uid
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
symfony/polyfill-uuid | v1.29.0 | 7.07 kB | MIT | prod |
Symfony/UID is a PHP package that offers an object-oriented API to generate and represent Universal Unique Identifiers (UUIDs) and Universally Unique Lexicographically Sortable Identifier (ULIDs). The package provides implementations compatible with both 32-bit and 64-bit CPUs and supports different versions of UUIDs (version 1 and versions 3 to 8).
Usage of the symfony/uid package relies mainly on object-oriented PHP programming principles. The package allows you to directly create different versions of UUIDs and ULIDs. Below are some basic code usage examples,
use Symfony\Component\Uid\UuidV4;
$uuid4 = UuidV4::v4(); // Generate a UUIDv4
echo $uuid4->toString(); // print the UUID
use Symfony\Component\Uid\Ulid;
$ulid = Ulid::generate(); // Generate a ULID
echo $ulid->toRfc4122(); // print the ULID
The documentation for Symfony/Uid is available on the official Symfony website, at the following URL: Symfony/Uid Documentation. Here, you will find comprehensive documentation on how to use the UID component, including detailed examples and parameters for different methods provided in the package. The "Contributing" section is a useful resource for anyone eager to contribute to the package's development.