Skip to content

Commit

Permalink
[feature] Added support for doctrine dbal 3 (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
notFloran authored Jan 28, 2021
1 parent fee4f68 commit 5610d20
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Check/DoctrineDbal.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ public function check()
{
$connection = $this->manager->getConnection($this->connectionName);
$query = $connection->getDriver()->getDatabasePlatform()->getDummySelectSQL();
$connection->fetchColumn($query);

// after dbal 2.11 fetchOne replace fetchColumn
if (method_exists($connection, 'fetchOne')) {
$connection->fetchOne($query);
} else {
$connection->fetchColumn($query);
}

return new Success();
}
Expand Down

0 comments on commit 5610d20

Please sign in to comment.