Skip to content

Commit

Permalink
Make Guid class compatible with gedmo uuid 4 (#393)
Browse files Browse the repository at this point in the history
Problem: the composer.json was updated so it's possible to have
gedmo/uuid 4, besides the project is not compatible with it.

Solution: update Guid class.
  • Loading branch information
Nek- authored May 2, 2020
1 parent 35d188b commit b2a838b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Util/Guid.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public static function generateString(): string

public static function generateAsHex(): string
{
return self::generate()->getHex();
// string cast is a BC layer for ramsey/uuid v3
// to be refactor when dropping retrocompatibility
return (string) self::generate()->getHex();
}

public static function fromString(string $uuid): UuidInterface
Expand Down

0 comments on commit b2a838b

Please sign in to comment.