uuid
uuid copied to clipboard
Cannot get Hex from Guid
To Reproduce...
$factory = new UuidFactory(new FeatureSet(true));
$guid = $factory->uuid4();
$hex= $guid->getHex();
Throws:
Ramsey\Uuid\Exception\InvalidArgumentException: The byte string received does not contain a valid version
ping @ramsey
The problem is that version is fetched from a different byte between the Guid Fields implementation and normal Fields implementation.
This difference is however not addressed in UuidFactory. As a result the version is in a different byte than where Guid Fields expects it.
I'm not sure what's the correct fix though. What is the correct bytes representation for GUIDs?