By daffie on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
9.1.x
Introduced in version:
9.1.0
Issue links:
Description:
Connection::prepareQuery() and Connection::prepare() are deprecated. The method Connection::prepareQuery() is replaced by Connection::prepareStatement(). The method Connection::prepare() is replaced by the method \PDO::prepare(). See: https://www.php.net/manual/en/pdo.prepare.php. This will properly only impact the maintainers/developers of database drivers.
Before
// $query is the query as a SQL string.
\Drupal\Core\Database\Connection->prepareQuery($query);
\Drupal\Core\Database\Connection->prepare($query);
After
// $options are the query options.
\Drupal\Core\Database\Connection->prepareStatement($query, $options);
// For the possible $driver_options, see: https://www.php.net/manual/en/pdo.prepare.php
\PDO::prepare($query, $driver_options);
Impacts:
Module developers