Skip to content

Commit f571ad4

Browse files
Merge branch '4.4' into 5.0
* 4.4: [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 cc48d05 + 7ddc6df commit f571ad4

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
@@ -257,7 +257,11 @@ public function createTable(): void
257257
$table->setPrimaryKey([$this->idCol]);
258258

259259
foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) {
260-
$conn->exec($sql);
260+
if (method_exists($conn, 'executeStatement')) {
261+
$conn->executeStatement($sql);
262+
} else {
263+
$conn->exec($sql);
264+
}
261265
}
262266

263267
return;
@@ -283,7 +287,11 @@ public function createTable(): void
283287
throw new \DomainException(sprintf('Creating the lock table is currently not implemented for PDO driver "%s".', $driver));
284288
}
285289

286-
$conn->exec($sql);
290+
if (method_exists($conn, 'executeStatement')) {
291+
$conn->executeStatement($sql);
292+
} else {
293+
$conn->exec($sql);
294+
}
287295
}
288296

289297
/**
@@ -293,7 +301,12 @@ private function prune(): void
293301
{
294302
$sql = "DELETE FROM $this->table WHERE $this->expirationCol <= {$this->getCurrentTimestampStatement()}";
295303

296-
$this->getConnection()->exec($sql);
304+
$conn = $this->getConnection();
305+
if (method_exists($conn, 'executeStatement')) {
306+
$conn->executeStatement($sql);
307+
} else {
308+
$conn->exec($sql);
309+
}
297310
}
298311

299312
private function getDriver(): string

0 commit comments

Comments
 (0)