diff --git a/composer.json b/composer.json index e76fed6..214132f 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "prefer-stable": true, "require": { "php": "^7.1.0", - "ramsey/uuid" : "^3.6.0", + "ramsey/uuid" : "^3.6.0 || ^4.0", "beberlei/assert": "^2.7.1 || ^3.0" }, "require-dev": { diff --git a/src/Messaging/FQCNMessageFactory.php b/src/Messaging/FQCNMessageFactory.php index e1b3b8c..efba8db 100644 --- a/src/Messaging/FQCNMessageFactory.php +++ b/src/Messaging/FQCNMessageFactory.php @@ -38,7 +38,7 @@ public function createMessageFromArray(string $messageName, array $messageData): } if (! isset($messageData['uuid'])) { - $messageData['uuid'] = Uuid::uuid4(); + $messageData['uuid'] = Uuid::uuid4()->toString(); } if (! isset($messageData['created_at'])) {