From d50315e07ddd26d0e0f94caf6d2d231c15f42ee2 Mon Sep 17 00:00:00 2001 From: Andrii Dembitskyi Date: Thu, 30 Sep 2021 15:05:41 +0300 Subject: [PATCH 1/3] Add explanation why we need to cast float to string in decimal type only starting from PHP 8.1 --- lib/Doctrine/DBAL/Types/DecimalType.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Doctrine/DBAL/Types/DecimalType.php b/lib/Doctrine/DBAL/Types/DecimalType.php index fbf53f3880a..f75d3db2c68 100644 --- a/lib/Doctrine/DBAL/Types/DecimalType.php +++ b/lib/Doctrine/DBAL/Types/DecimalType.php @@ -34,6 +34,8 @@ public function getSQLDeclaration(array $column, AbstractPlatform $platform) */ public function convertToPHPValue($value, AbstractPlatform $platform) { + // Some drivers starting from PHP 8.1 can represent decimals as float + // See also: https://github.com/doctrine/dbal/pull/4818 if (PHP_VERSION_ID >= 80100 && is_float($value)) { return (string) $value; } From 2411a55a2a628e6d8dd598388ab13474802c7b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 2 Oct 2021 17:59:26 +0200 Subject: [PATCH 2/3] Release 2.13.4 --- lib/Doctrine/DBAL/Version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Version.php b/lib/Doctrine/DBAL/Version.php index 0c0f1376be5..8f0e7ba0f48 100644 --- a/lib/Doctrine/DBAL/Version.php +++ b/lib/Doctrine/DBAL/Version.php @@ -17,7 +17,7 @@ class Version /** * Current Doctrine Version. */ - public const VERSION = '2.13.4-DEV'; + public const VERSION = '2.13.4'; /** * Compares a Doctrine version with the current one. From 5b49bda49a7ae8837dde5f0e9fb1dca8b2d4d674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 2 Oct 2021 18:05:13 +0200 Subject: [PATCH 3/3] Bump version to 2.13.5-dev --- lib/Doctrine/DBAL/Version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Version.php b/lib/Doctrine/DBAL/Version.php index 8f0e7ba0f48..613dba06214 100644 --- a/lib/Doctrine/DBAL/Version.php +++ b/lib/Doctrine/DBAL/Version.php @@ -17,7 +17,7 @@ class Version /** * Current Doctrine Version. */ - public const VERSION = '2.13.4'; + public const VERSION = '2.13.5-dev'; /** * Compares a Doctrine version with the current one.