Skip to content

Commit 6a271d9

Browse files
committed
Better explain mysql's decimal literal and float literal
1 parent 8c726d8 commit 6a271d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Type/Doctrine/Query/QueryResultTypeWalker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,8 +1133,8 @@ public function walkLiteral($literal)
11331133

11341134
if ($this->em->getConnection()->getDatabasePlatform() instanceof AbstractMySQLPlatform) {
11351135

1136-
// both PDO_mysql and mysqli hydrates 123.4 literals as string no matter the configuration (e.g. PDO::ATTR_STRINGIFY_FETCHES being false) and PHP version
1137-
// the only way to force float is to use 123.4e0 scientific notation
1136+
// both pdo_mysql and mysqli hydrates decimal literal (e.g. 123.4) as string no matter the configuration (e.g. PDO::ATTR_STRINGIFY_FETCHES being false) and PHP version
1137+
// the only way to force float is to use float literal with scientific notation (e.g. 123.4e0)
11381138
// https://dev.mysql.com/doc/refman/8.0/en/number-literals.html
11391139

11401140
if (stripos((string) $value, 'e') !== false) {

0 commit comments

Comments
 (0)