Skip to content

Commit 8deb195

Browse files
committed
fix compatibility with Doctrine DBAL 3
1 parent 26ddd81 commit 8deb195

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Store/PdoStore.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Doctrine\DBAL\DBALException;
1616
use Doctrine\DBAL\Driver\Result;
1717
use Doctrine\DBAL\DriverManager;
18+
use Doctrine\DBAL\Exception;
1819
use Doctrine\DBAL\Schema\Schema;
1920
use Symfony\Component\Lock\Exception\InvalidArgumentException;
2021
use Symfony\Component\Lock\Exception\InvalidTtlException;
@@ -127,7 +128,7 @@ public function save(Key $key)
127128

128129
try {
129130
$stmt->execute();
130-
} catch (DBALException $e) {
131+
} catch (DBALException | Exception $e) {
131132
// the lock is already acquired. It could be us. Let's try to put off.
132133
$this->putOffExpiration($key, $this->initialTtl);
133134
} catch (\PDOException $e) {
@@ -250,6 +251,7 @@ private function getConnection()
250251
*
251252
* @throws \PDOException When the table already exists
252253
* @throws DBALException When the table already exists
254+
* @throws Exception When the table already exists
253255
* @throws \DomainException When an unsupported PDO driver is used
254256
*/
255257
public function createTable(): void

0 commit comments

Comments
 (0)