Skip to content

Commit e5bb4a2

Browse files
Merge branch '5.0' into 5.1
* 5.0: [Cache] Use the default expiry when saving (not when creating) items Fix typo Fix DBAL deprecation [Form] Fix ChoiceType translation domain Add Tagalog translations for new form messages [Form] Add missing vietnamese translations sync translations from master [OptionsResolver] Fix force prepend normalizer add vietnamese translation for html5 color validation
2 parents 29b61ac + f571ad4 commit e5bb4a2

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

Store/PdoStore.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,11 @@ public function createTable(): void
253253
$this->addTableToSchema($schema);
254254

255255
foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) {
256-
$conn->exec($sql);
256+
if (method_exists($conn, 'executeStatement')) {
257+
$conn->executeStatement($sql);
258+
} else {
259+
$conn->exec($sql);
260+
}
257261
}
258262

259263
return;
@@ -279,7 +283,11 @@ public function createTable(): void
279283
throw new \DomainException(sprintf('Creating the lock table is currently not implemented for PDO driver "%s".', $driver));
280284
}
281285

282-
$conn->exec($sql);
286+
if (method_exists($conn, 'executeStatement')) {
287+
$conn->executeStatement($sql);
288+
} else {
289+
$conn->exec($sql);
290+
}
283291
}
284292

285293
/**
@@ -305,7 +313,12 @@ private function prune(): void
305313
{
306314
$sql = "DELETE FROM $this->table WHERE $this->expirationCol <= {$this->getCurrentTimestampStatement()}";
307315

308-
$this->getConnection()->exec($sql);
316+
$conn = $this->getConnection();
317+
if (method_exists($conn, 'executeStatement')) {
318+
$conn->executeStatement($sql);
319+
} else {
320+
$conn->exec($sql);
321+
}
309322
}
310323

311324
private function getDriver(): string

0 commit comments

Comments
 (0)