Skip to content

Commit

Permalink
Merge pull request #1984 from andysh-uk/cast-database-platform-doctrine
Browse files Browse the repository at this point in the history
Use DatabasePlatform instead of Driver to check for MySQL/MariaDB
  • Loading branch information
bobdenotter authored Oct 13, 2020
2 parents 84e1728 + 0b6d28c commit c861215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Doctrine/Query/Cast.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Cast extends FunctionNode

public function getSql(SqlWalker $sqlWalker): string
{
$backend_driver = $sqlWalker->getConnection()->getDriver()->getName();
$backend_driver = $sqlWalker->getConnection()->getDatabasePlatform()->getName();

// test if we are using MySQL
if (mb_strpos($backend_driver, 'mysql') !== false) {
Expand Down

0 comments on commit c861215

Please sign in to comment.