From 55316e813598517cf9fffb9941114ee758983558 Mon Sep 17 00:00:00 2001 From: CvekCoding <36374606+CvekCoding@users.noreply.github.com> Date: Fri, 31 Jul 2020 10:20:08 +0300 Subject: [PATCH] Fix condition - check interface --- src/UuidBinaryType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UuidBinaryType.php b/src/UuidBinaryType.php index d709b85..1bd22bb 100644 --- a/src/UuidBinaryType.php +++ b/src/UuidBinaryType.php @@ -63,7 +63,7 @@ public function convertToDatabaseValue($value): ?Binary if (is_string($value) && Uuid::isValid($value)) { $value = Uuid::fromString($value); } - if ($value instanceof Uuid) { + if ($value instanceof UuidInterface) { return new Binary($value->getBytes(), Binary::TYPE_UUID); } throw ConversionException::conversionFailed($value, self::NAME);