diff --git a/src/Persisters/Entity/BasicEntityPersister.php b/src/Persisters/Entity/BasicEntityPersister.php index 843cc0b21f3..03999dcb606 100644 --- a/src/Persisters/Entity/BasicEntityPersister.php +++ b/src/Persisters/Entity/BasicEntityPersister.php @@ -10,6 +10,7 @@ use Doctrine\Common\Collections\Order; use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Exception; use Doctrine\DBAL\LockMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Platforms\AbstractPlatform; @@ -1929,7 +1930,11 @@ private function getTypes(string $field, mixed $value, ClassMetadata $class): ar return $types; } - /** @psalm-return ArrayParameterType::* */ + /** @psalm-return ArrayParameterType::* + * + * @throws QueryException + * @throws Exception + */ private function getArrayBindingType(ParameterType|int|string $type): ArrayParameterType|int { if (! $type instanceof ParameterType) { @@ -1940,6 +1945,8 @@ private function getArrayBindingType(ParameterType|int|string $type): ArrayParam ParameterType::STRING => ArrayParameterType::STRING, ParameterType::INTEGER => ArrayParameterType::INTEGER, ParameterType::ASCII => ArrayParameterType::ASCII, + ParameterType::BINARY => ArrayParameterType::BINARY, + default => throw new QueryException('Unsupported type for array parameter'), }; }