Unverified Commit eaf33de1 authored by larowlan's avatar larowlan

Issue #3174848 by alexpott: Fix typo in Connection::prepare deprecation message

parent 563ed8e8
......@@ -1736,13 +1736,13 @@ public function commit() {
*
* @deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Database
* drivers should instantiate \PDOStatement objects by calling
* \PDO::prepare in their Collection::prepareStatement method instead.
* \PDO::prepare in their Connection::prepareStatement method instead.
* \PDO::prepare should not be called outside of driver code.
*
* @see https://www.drupal.org/node/3137786
*/
public function prepare($statement, array $driver_options = []) {
@trigger_error('Connection::prepare() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Database drivers should instantiate \PDOStatement objects by calling \PDO::prepare in their Collection::prepareStatement method instead. \PDO::prepare should not be called outside of driver code. See https://www.drupal.org/node/3137786', E_USER_DEPRECATED);
@trigger_error('Connection::prepare() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Database drivers should instantiate \PDOStatement objects by calling \PDO::prepare in their Connection::prepareStatement method instead. \PDO::prepare should not be called outside of driver code. See https://www.drupal.org/node/3137786', E_USER_DEPRECATED);
return $this->connection->prepare($statement, $driver_options);
}
......
......@@ -349,7 +349,7 @@ public static function sqlFunctionLikeBinary($pattern, $subject) {
* {@inheritdoc}
*/
public function prepare($statement, array $driver_options = []) {
@trigger_error('Connection::prepare() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Database drivers should instantiate \PDOStatement objects by calling \PDO::prepare in their Collection::prepareStatement method instead. \PDO::prepare should not be called outside of driver code. See https://www.drupal.org/node/3137786', E_USER_DEPRECATED);
@trigger_error('Connection::prepare() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Database drivers should instantiate \PDOStatement objects by calling \PDO::prepare in their Connection::prepareStatement method instead. \PDO::prepare should not be called outside of driver code. See https://www.drupal.org/node/3137786', E_USER_DEPRECATED);
return new Statement($this->connection, $this, $statement, $driver_options);
}
......
......@@ -17,7 +17,7 @@ class DatabaseExceptionWrapperTest extends KernelTestBase {
* Tests deprecation of Connection::prepare.
*
* @group legacy
* @expectedDeprecation Connection::prepare() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Database drivers should instantiate \PDOStatement objects by calling \PDO::prepare in their Collection::prepareStatement method instead. \PDO::prepare should not be called outside of driver code. See https://www.drupal.org/node/3137786
* @expectedDeprecation Connection::prepare() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Database drivers should instantiate \PDOStatement objects by calling \PDO::prepare in their Connection::prepareStatement method instead. \PDO::prepare should not be called outside of driver code. See https://www.drupal.org/node/3137786
*/
public function testPrepare() {
$connection = Database::getConnection();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment