From 5610d20786bf53d02f6506e18d22331f0cda5b81 Mon Sep 17 00:00:00 2001 From: Floran Brutel Date: Thu, 28 Jan 2021 20:48:33 +0100 Subject: [PATCH] [feature] Added support for doctrine dbal 3 (#257) --- Check/DoctrineDbal.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Check/DoctrineDbal.php b/Check/DoctrineDbal.php index 53c1be83..a096c052 100644 --- a/Check/DoctrineDbal.php +++ b/Check/DoctrineDbal.php @@ -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(); }