Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.13.x' into 3.1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Oct 2, 2021
2 parents 07fe6ff + 5b49bda commit 96b0053
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Types/DecimalType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 96b0053

Please sign in to comment.