diff --git a/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php index 42be880..3d76631 100644 --- a/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php @@ -7,6 +7,7 @@ namespace Drupal\Core\Database\Driver\mysql; +use Drupal\Component\Utility\String; use Drupal\Core\Database\Database; use Drupal\Core\Database\Query\Condition; use Drupal\Core\Database\SchemaObjectExistsException; @@ -332,10 +333,10 @@ public function dropTable($table) { */ public function copyTable($source, $destination) { if (!$this->tableExists($source)) { - throw new SchemaObjectDoesNotExistException(t("Cannot copy @source to @destination: table @source doesn't exist.", array('@source' => $source, '@destination' => $destination))); + throw new SchemaObjectDoesNotExistException(String::format("Cannot copy @source to @destination: table @source doesn't exist.", array('@source' => $source, '@destination' => $destination))); } if ($this->tableExists($destination)) { - throw new SchemaObjectExistsException(t("Cannot copy @source to @destination: table @destination already exists.", array('@source' => $source, '@destination' => $destination))); + throw new SchemaObjectExistsException(String::format("Cannot copy @source to @destination: table @destination already exists.", array('@source' => $source, '@destination' => $destination))); } $info = $this->getPrefixInfo($destination); diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php index f8ddd93..551c7cb 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php @@ -7,6 +7,7 @@ namespace Drupal\Core\Database\Driver\pgsql; +use Drupal\Component\Utility\String; use Drupal\Core\Database\Database; use Drupal\Core\Database\Query\Condition; use Drupal\Core\Database\SchemaObjectExistsException; @@ -353,10 +354,10 @@ function renameTable($table, $new_name) { */ public function copyTable($source, $destination) { if (!$this->tableExists($source)) { - throw new SchemaObjectDoesNotExistException(t("Cannot copy @source to @destination: table @source doesn't exist.", array('@source' => $source, '@destination' => $destination))); + throw new SchemaObjectDoesNotExistException(String::format("Cannot copy @source to @destination: table @source doesn't exist.", array('@source' => $source, '@destination' => $destination))); } if ($this->tableExists($destination)) { - throw new SchemaObjectExistsException(t("Cannot copy @source to @destination: table @destination already exists.", array('@source' => $source, '@destination' => $destination))); + throw new SchemaObjectExistsException(String::format("Cannot copy @source to @destination: table @destination already exists.", array('@source' => $source, '@destination' => $destination))); } // @TODO The server is likely going to rename indexes and constraints // during the copy process, and it will not match our diff --git a/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php b/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php index 89651bb..2a05696 100644 --- a/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php +++ b/core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php @@ -7,6 +7,7 @@ namespace Drupal\Core\Database\Driver\sqlite; +use Drupal\Component\Utility\String; use Drupal\Core\Database\SchemaObjectExistsException; use Drupal\Core\Database\SchemaObjectDoesNotExistException; use Drupal\Core\Database\Schema as DatabaseSchema; @@ -277,10 +278,10 @@ public function renameTable($table, $new_name) { */ public function copyTable($source, $destination) { if (!$this->tableExists($source)) { - throw new SchemaObjectDoesNotExistException(t("Cannot copy @source to @destination: table @source doesn't exist.", array('@source' => $source, '@destination' => $destination))); + throw new SchemaObjectDoesNotExistException(String::format("Cannot copy @source to @destination: table @source doesn't exist.", array('@source' => $source, '@destination' => $destination))); } if ($this->tableExists($destination)) { - throw new SchemaObjectExistsException(t("Cannot copy @source to @destination: table @destination already exists.", array('@source' => $source, '@destination' => $destination))); + throw new SchemaObjectExistsException(String::format("Cannot copy @source to @destination: table @destination already exists.", array('@source' => $source, '@destination' => $destination))); } $this->createTable($destination, $this->introspectSchema($source));