Skip to content

Commit b714b83

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: fix compatibility with Doctrine DBAL 3
2 parents 90cd5be + 8deb195 commit b714b83

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;
@@ -126,7 +127,7 @@ public function save(Key $key)
126127

127128
try {
128129
$stmt->execute();
129-
} catch (DBALException $e) {
130+
} catch (DBALException | Exception $e) {
130131
// the lock is already acquired. It could be us. Let's try to put off.
131132
$this->putOffExpiration($key, $this->initialTtl);
132133
} catch (\PDOException $e) {
@@ -240,6 +241,7 @@ private function getConnection(): object
240241
*
241242
* @throws \PDOException When the table already exists
242243
* @throws DBALException When the table already exists
244+
* @throws Exception When the table already exists
243245
* @throws \DomainException When an unsupported PDO driver is used
244246
*/
245247
public function createTable(): void

0 commit comments

Comments
 (0)