diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php
index c6e4ab3a30..d407f8e0e8 100644
--- a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php
+++ b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php
@@ -81,7 +81,11 @@ class DoctrineTokenProvider implements TokenProviderInterface
$sql = 'DELETE FROM rememberme_token WHERE series=:series';
$paramValues = ['series' => $series];
$paramTypes = ['series' => \PDO::PARAM_STR];
- $this->conn->executeUpdate($sql, $paramValues, $paramTypes);
+ if (method_exists($this->conn, 'executeStatement')) {
+ $this->conn->executeStatement($sql, $paramValues, $paramTypes);
+ } else {
+ $this->conn->executeUpdate($sql, $paramValues, $paramTypes);
+ }
}
/**
@@ -101,7 +105,11 @@ class DoctrineTokenProvider implements TokenProviderInterface
'lastUsed' => self::$useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE,
'series' => \PDO::PARAM_STR,
];
- $updated = $this->conn->executeUpdate($sql, $paramValues, $paramTypes);
+ if (method_exists($this->conn, 'executeStatement')) {
+ $updated = $this->conn->executeStatement($sql, $paramValues, $paramTypes);
+ } else {
+ $updated = $this->conn->executeUpdate($sql, $paramValues, $paramTypes);
+ }
if ($updated < 1) {
throw new TokenNotFoundException('No token found.');
}
@@ -129,6 +137,10 @@ class DoctrineTokenProvider implements TokenProviderInterface
'value' => \PDO::PARAM_STR,
'lastUsed' => self::$useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE,
];
- $this->conn->executeUpdate($sql, $paramValues, $paramTypes);
+ if (method_exists($this->conn, 'executeStatement')) {
+ $this->conn->executeStatement($sql, $paramValues, $paramTypes);
+ } else {
+ $this->conn->executeUpdate($sql, $paramValues, $paramTypes);
+ }
}
}
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php
index df696ff7ff..1e36454c41 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php
@@ -72,7 +72,7 @@ class DoctrineTokenProviderTest extends TestCase
'driver' => 'pdo_sqlite',
'url' => 'sqlite:///:memory:',
]);
- $connection->executeUpdate(<<< 'SQL'
+ $connection->{method_exists($this->conn, 'executeStatement') ? 'executeStatement' : 'executeUpdate'}(<<< 'SQL'
CREATE TABLE rememberme_token (
series char(88) UNIQUE PRIMARY KEY NOT NULL,
value char(88) NOT NULL,
diff --git a/src/Symfony/Component/Cache/Traits/PdoTrait.php b/src/Symfony/Component/Cache/Traits/PdoTrait.php
index 48d5bdef73..02a4db7d69 100644
--- a/src/Symfony/Component/Cache/Traits/PdoTrait.php
+++ b/src/Symfony/Component/Cache/Traits/PdoTrait.php
@@ -113,7 +113,11 @@ trait PdoTrait
$table->setPrimaryKey([$this->idCol]);
foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) {
- $conn->exec($sql);
+ if (method_exists($conn, 'executeStatement')) {
+ $conn->executeStatement($sql);
+ } else {
+ $conn->exec($sql);
+ }
}
return;
@@ -144,7 +148,11 @@ trait PdoTrait
throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver));
}
- $conn->exec($sql);
+ if (method_exists($conn, 'executeStatement')) {
+ $conn->executeStatement($sql);
+ } else {
+ $conn->exec($sql);
+ }
}
/**
@@ -256,7 +264,11 @@ trait PdoTrait
}
try {
- $conn->exec($sql);
+ if (method_exists($conn, 'executeStatement')) {
+ $conn->executeStatement($sql);
+ } else {
+ $conn->exec($sql);
+ }
} catch (TableNotFoundException $e) {
} catch (\PDOException $e) {
}
diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
index 4be8814977..dce846f10e 100644
--- a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
+++ b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
@@ -368,7 +368,7 @@ class ChoiceType extends AbstractType
'value' => $choiceView->value,
'label' => $choiceView->label,
'attr' => $choiceView->attr,
- 'translation_domain' => $options['translation_domain'],
+ 'translation_domain' => $options['choice_translation_domain'],
'block_name' => 'entry',
];
diff --git a/src/Symfony/Component/Form/Resources/translations/validators.en.xlf b/src/Symfony/Component/Form/Resources/translations/validators.en.xlf
index 89814258d1..97ed83fd47 100644
--- a/src/Symfony/Component/Form/Resources/translations/validators.en.xlf
+++ b/src/Symfony/Component/Form/Resources/translations/validators.en.xlf
@@ -18,6 +18,102 @@