diff --git a/core/lib/Drupal/Core/Database/Php7StatementInterface.php b/core/lib/Drupal/Core/Database/Php7StatementInterface.php
new file mode 100644
index 0000000000..9c42998693
--- /dev/null
+++ b/core/lib/Drupal/Core/Database/Php7StatementInterface.php
@@ -0,0 +1,65 @@
+<?php
+
+namespace Drupal\Core\Database;
+
+/**
+ * Compatibility layer for \Drupal\Core\Database\StatementInterface.
+ *
+ * @internal
+ */
+interface Php7StatementInterface {
+
+  /**
+   * Fetches the next row from a result set.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param int $mode
+   *   One of the PDO::FETCH_* constants.
+   *   Default to what was specified by setFetchMode().
+   * @param int $cursor_orientation
+   *   Not implemented in all database drivers, don't use.
+   * @param int $cursor_offset
+   *   Not implemented in all database drivers, don't use.
+   *
+   * @return
+   *   A result, formatted according to $mode.
+   */
+  public function fetch($mode = NULL, $cursor_orientation = NULL, $cursor_offset = NULL);
+
+  /**
+   * Returns an array containing all of the result set rows.
+   *
+   * @param $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param $column_index
+   *   If $mode is PDO::FETCH_COLUMN, the index of the column to fetch.
+   * @param $constructor_arguments
+   *   If $mode is PDO::FETCH_CLASS, the arguments to pass to the constructor.
+   *
+   * @return
+   *   An array of results.
+   */
+  public function fetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL);
+
+  /**
+   * Sets the default fetch mode for this statement.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param $a1
+   *   An option depending of the fetch mode specified by $mode:
+   *   - for PDO::FETCH_COLUMN, the index of the column to fetch
+   *   - for PDO::FETCH_CLASS, the name of the class to create
+   *   - for PDO::FETCH_INTO, the object to add the data to
+   * @param $a2
+   *   If $mode is PDO::FETCH_CLASS, the optional arguments to pass to the
+   *   constructor.
+   */
+  public function setFetchMode($mode, $a1 = NULL, $a2 = []);
+
+}
diff --git a/core/lib/Drupal/Core/Database/Php7StatementTrait.php b/core/lib/Drupal/Core/Database/Php7StatementTrait.php
new file mode 100644
index 0000000000..9b1d092c49
--- /dev/null
+++ b/core/lib/Drupal/Core/Database/Php7StatementTrait.php
@@ -0,0 +1,98 @@
+<?php
+
+namespace Drupal\Core\Database;
+
+/**
+ * Compatibility layer for \Drupal\Core\Database\StatementInterface.
+ */
+trait Php7StatementTrait {
+
+  /**
+   * Fetches the next row from a result set.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param int $mode
+   *   One of the PDO::FETCH_* constants.
+   *   Default to what was specified by setFetchMode().
+   * @param int $cursor_orientation
+   *   Not implemented in all database drivers, don't use.
+   * @param int $cursor_offset
+   *   Not implemented in all database drivers, don't use.
+   *
+   * @return
+   *   A result, formatted according to $mode.
+   */
+  public function fetch($mode = NULL, $cursor_orientation = NULL, $cursor_offset = NULL) {
+    return $this->doFetch($mode, $cursor_orientation, $cursor_offset);
+  }
+
+  /**
+   * Returns an array containing all of the result set rows.
+   *
+   * @param $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param $column_index
+   *   If $mode is PDO::FETCH_COLUMN, the index of the column to fetch.
+   * @param $constructor_arguments
+   *   If $mode is PDO::FETCH_CLASS, the arguments to pass to the constructor.
+   *
+   * @return
+   *   An array of results.
+   */
+  public function fetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL) {
+    // Call \PDOStatement::fetchAll to fetch all rows.
+    // \PDOStatement is picky about the number of arguments in some cases so we
+    // need to be pass the exact number of arguments we where given.
+    switch (func_num_args()) {
+      case 0:
+        return $this->doFetchAll();
+
+      case 1:
+        return $this->doFetchAll($mode);
+
+      case 2:
+        return $this->doFetchAll($mode, $column_index);
+
+      case 3:
+      default:
+        return $this->doFetchAll($mode, $column_index, $constructor_arguments);
+    }
+  }
+
+  /**
+   * Sets the default fetch mode for this statement.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param $a1
+   *   An option depending of the fetch mode specified by $mode:
+   *   - for PDO::FETCH_COLUMN, the index of the column to fetch
+   *   - for PDO::FETCH_CLASS, the name of the class to create
+   *   - for PDO::FETCH_INTO, the object to add the data to
+   * @param $a2
+   *   If $mode is PDO::FETCH_CLASS, the optional arguments to pass to the
+   *   constructor.
+   */
+  public function setFetchMode($mode, $a1 = NULL, $a2 = []) {
+    // Call \PDOStatement::setFetchMode to set fetch mode.
+    // \PDOStatement is picky about the number of arguments in some cases so we
+    // need to be pass the exact number of arguments we where given.
+    switch (func_num_args()) {
+      case 1:
+        return $this->doSetFetchMode($mode);
+
+      case 2:
+        return $this->doSetFetchMode($mode, $a1);
+
+      case 3:
+      default:
+        return $this->doSetFetchMode($mode, $a1, $a2);
+    }
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Database/Php8StatementInterface.php b/core/lib/Drupal/Core/Database/Php8StatementInterface.php
new file mode 100644
index 0000000000..a132329e97
--- /dev/null
+++ b/core/lib/Drupal/Core/Database/Php8StatementInterface.php
@@ -0,0 +1,65 @@
+<?php
+
+namespace Drupal\Core\Database;
+
+/**
+ * Compatibility layer for \Drupal\Core\Database\StatementInterface.
+ *
+ * @internal
+ */
+interface Php8StatementInterface {
+
+  /**
+   * Fetches the next row from a result set.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param int $mode
+   *   One of the PDO::FETCH_* constants.
+   *   Default to what was specified by setFetchMode().
+   * @param int $cursor_orientation
+   *   Not implemented in all database drivers, don't use.
+   * @param int $cursor_offset
+   *   Not implemented in all database drivers, don't use.
+   *
+   * @return
+   *   A result, formatted according to $mode.
+   */
+  public function fetch(int $mode = \PDO::FETCH_BOTH, int $cursor_orientation = \PDO::FETCH_ORI_NEXT, int $cursor_offset = 0);
+
+  /**
+   * Returns an array containing all of the result set rows.
+   *
+   * @param int $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param mixed $args
+   *   Mixed arguments depending on the $mode.
+   *
+   * @return
+   *   An array of results.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::fetchAll()
+   */
+  public function fetchAll(int $mode = \PDO::FETCH_BOTH, ...$args);
+
+  /**
+   * Sets the default fetch mode for this statement.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param int $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param mixed $params
+   *   The first argument is an option depending of the fetch mode specified
+   *   by $mode:
+   *   - for PDO::FETCH_COLUMN, the index of the column to fetch
+   *   - for PDO::FETCH_CLASS, the name of the class to create
+   *   - for PDO::FETCH_INTO, the object to add the data to
+   *   If $mode is PDO::FETCH_CLASS, the second argument is passed to the
+   *   constructor.
+   */
+  public function setFetchMode(int $mode, ...$params);
+
+}
diff --git a/core/lib/Drupal/Core/Database/Php8StatementTrait.php b/core/lib/Drupal/Core/Database/Php8StatementTrait.php
new file mode 100644
index 0000000000..3ffe61cc4d
--- /dev/null
+++ b/core/lib/Drupal/Core/Database/Php8StatementTrait.php
@@ -0,0 +1,102 @@
+<?php
+
+namespace Drupal\Core\Database;
+
+/**
+ * Compatibility layer for \Drupal\Core\Database\StatementInterface.
+ */
+trait Php8StatementTrait {
+
+  /**
+   * Fetches the next row from a result set.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param int $mode
+   *   One of the PDO::FETCH_* constants. Defaults to what was specified by
+   *   setFetchMode(). Note the default value on the implementation is different
+   *   from the default value on \PDO::fetch() for PHP 8 in order to allow
+   *   \Drupal\Core\Database\StatementPrefetch to behave the same on PHP 7 & 8.
+   * @param int $cursor_orientation
+   *   Not implemented in all database drivers, don't use.
+   * @param int $cursor_offset
+   *   Not implemented in all database drivers, don't use.
+   *
+   * @return
+   *   A result, formatted according to $mode.
+   */
+  public function fetch(int $mode = 0, int $cursor_orientation = \PDO::FETCH_ORI_NEXT, int $cursor_offset = 0) {
+    return $this->doFetch($mode, $cursor_orientation, $cursor_offset);
+  }
+
+  /**
+   * Returns an array containing all of the result set rows.
+   *
+   * @param int $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param mixed $args
+   *   Mixed arguments depending on the $mode.
+   *
+   * @return
+   *   An array of results.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::fetchAll()
+   */
+  public function fetchAll(int $mode = \PDO::FETCH_BOTH, ...$args) {
+    // Call \PDOStatement::fetchAll to fetch all rows.
+    // \PDOStatement is picky about the number of arguments in some cases so we
+    // need to be pass the exact number of arguments we where given.
+    switch (func_num_args()) {
+      case 0:
+        return $this->doFetchAll();
+
+      case 1:
+        return $this->doFetchAll($mode);
+
+      case 2:
+        return $this->doFetchAll($mode, $args[0]);
+
+      case 3:
+      default:
+        $arg1 = array_shift($args);
+        return $this->doFetchAll($mode, $arg1, ...$args);
+    }
+  }
+
+  /**
+   * Sets the default fetch mode for this statement.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param int $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param mixed $params
+   *   The first argument is an option depending of the fetch mode specified
+   *   by $mode:
+   *   - for PDO::FETCH_COLUMN, the index of the column to fetch
+   *   - for PDO::FETCH_CLASS, the name of the class to create
+   *   - for PDO::FETCH_INTO, the object to add the data to
+   *   If $mode is PDO::FETCH_CLASS, the second argument is passed to the
+   *   constructor.
+   */
+  public function setFetchMode(int $mode, ...$params) {
+    // Call \PDOStatement::setFetchMode to set fetch mode.
+    // \PDOStatement is picky about the number of arguments in some cases so we
+    // need to be pass the exact number of arguments we where given.
+    switch (func_num_args()) {
+      case 1:
+        return $this->doSetFetchMode($mode);
+
+      case 2:
+        return $this->doSetFetchMode($mode, $params[0]);
+
+      case 3:
+      default:
+        $a1 = array_shift($params);
+        return $this->doSetFetchMode($mode, $a1, ...$params);
+    }
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Database/Statement.php b/core/lib/Drupal/Core/Database/Statement.php
index c6a120d611..70d389174c 100644
--- a/core/lib/Drupal/Core/Database/Statement.php
+++ b/core/lib/Drupal/Core/Database/Statement.php
@@ -2,6 +2,13 @@
 
 namespace Drupal\Core\Database;
 
+if (PHP_VERSION_ID >= 80000) {
+  class_alias('\Drupal\Core\Database\Php8StatementTrait', '\Drupal\Core\Database\StatementTrait');
+}
+else {
+  class_alias('\Drupal\Core\Database\Php7StatementTrait', '\Drupal\Core\Database\StatementTrait');
+}
+
 /**
  * Default implementation of StatementInterface.
  *
@@ -14,6 +21,7 @@
  * @see http://php.net/pdostatement
  */
 class Statement extends \PDOStatement implements StatementInterface {
+  use StatementTrait;
 
   /**
    * Reference to the database connection object for this statement.
@@ -144,9 +152,26 @@ public function rowCount() {
   }
 
   /**
-   * {@inheritdoc}
+   * Sets the default fetch mode for this statement.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param $a1
+   *   An option depending of the fetch mode specified by $mode:
+   *   - for PDO::FETCH_COLUMN, the index of the column to fetch
+   *   - for PDO::FETCH_CLASS, the name of the class to create
+   *   - for PDO::FETCH_INTO, the object to add the data to
+   * @param $a2
+   *   If $mode is PDO::FETCH_CLASS, the optional arguments to pass to the
+   *   constructor.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::setFetchMode()
+   * @see \Drupal\Core\Database\Php8StatementTrait::setFetchMode()
    */
-  public function setFetchMode($mode, $a1 = NULL, $a2 = []) {
+  public function doSetFetchMode($mode, $a1 = NULL, $a2 = []) {
     // Call \PDOStatement::setFetchMode to set fetch mode.
     // \PDOStatement is picky about the number of arguments in some cases so we
     // need to be pass the exact number of arguments we where given.
@@ -164,9 +189,39 @@ public function setFetchMode($mode, $a1 = NULL, $a2 = []) {
   }
 
   /**
-   * {@inheritdoc}
+   * Fetches the next row from a result set.
+   *
+   * @param int $mode
+   *   One of the PDO::FETCH_* constants. Default to what was specified by
+   *   setFetchMode().
+   *
+   * @return
+   *   A result.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::fetch()
+   * @see \Drupal\Core\Database\Php8StatementTrait::fetch()
+   */
+  public function doFetch($mode) {
+    return parent::fetch($mode);
+  }
+
+  /**
+   * Returns an array containing all of the result set rows.
+   *
+   * @param $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param $column_index
+   *   If $mode is PDO::FETCH_COLUMN, the index of the column to fetch.
+   * @param $constructor_arguments
+   *   If $mode is PDO::FETCH_CLASS, the arguments to pass to the constructor.
+   *
+   * @return
+   *   An array of results.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::fetchAll()
+   * @see \Drupal\Core\Database\Php8StatementTrait::fetchAll()
    */
-  public function fetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL) {
+  public function doFetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL) {
     // Call \PDOStatement::fetchAll to fetch all rows.
     // \PDOStatement is picky about the number of arguments in some cases so we
     // need to be pass the exact number of arguments we where given.
diff --git a/core/lib/Drupal/Core/Database/StatementEmpty.php b/core/lib/Drupal/Core/Database/StatementEmpty.php
index a87bca920a..784d27e218 100644
--- a/core/lib/Drupal/Core/Database/StatementEmpty.php
+++ b/core/lib/Drupal/Core/Database/StatementEmpty.php
@@ -2,6 +2,13 @@
 
 namespace Drupal\Core\Database;
 
+if (PHP_VERSION_ID >= 80000) {
+  class_alias('\Drupal\Core\Database\Php8StatementTrait', '\Drupal\Core\Database\StatementTrait');
+}
+else {
+  class_alias('\Drupal\Core\Database\Php7StatementTrait', '\Drupal\Core\Database\StatementTrait');
+}
+
 /**
  * Empty implementation of a database statement.
  *
@@ -14,6 +21,7 @@
  * @see \Drupal\search\SearchQuery
  */
 class StatementEmpty implements \Iterator, StatementInterface {
+  use StatementTrait;
 
   /**
    * Is rowCount() execution allowed.
@@ -47,14 +55,37 @@ public function rowCount() {
   }
 
   /**
-   * {@inheritdoc}
+   * Sets the default fetch mode for this statement.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param $a1
+   *   An option depending of the fetch mode specified by $mode:
+   *   - for PDO::FETCH_COLUMN, the index of the column to fetch
+   *   - for PDO::FETCH_CLASS, the name of the class to create
+   *   - for PDO::FETCH_INTO, the object to add the data to
+   * @param $a2
+   *   If $mode is PDO::FETCH_CLASS, the optional arguments to pass to the
+   *   constructor.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::setFetchMode()
+   * @see \Drupal\Core\Database\Php8StatementTrait::setFetchMode()
    */
-  public function setFetchMode($mode, $a1 = NULL, $a2 = []) {}
+  public function doSetFetchMode($mode, $a1 = NULL, $a2 = []) {}
 
   /**
-   * {@inheritdoc}
+   * Fetches the next row from a result set.
+   *
+   * @return
+   *   A result.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::fetch()
+   * @see \Drupal\Core\Database\Php8StatementTrait::fetch()
    */
-  public function fetch($mode = NULL, $cursor_orientation = NULL, $cursor_offset = NULL) {
+  public function doFetch() {
     return NULL;
   }
 
@@ -80,9 +111,22 @@ public function fetchAssoc() {
   }
 
   /**
-   * {@inheritdoc}
+   * Returns an array containing all of the result set rows.
+   *
+   * @param $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param $column_index
+   *   If $mode is PDO::FETCH_COLUMN, the index of the column to fetch.
+   * @param $constructor_arguments
+   *   If $mode is PDO::FETCH_CLASS, the arguments to pass to the constructor.
+   *
+   * @return
+   *   An array of results.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::fetchAll()
+   * @see \Drupal\Core\Database\Php8StatementTrait::fetchAll()
    */
-  public function fetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL) {
+  public function doFetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL) {
     return [];
   }
 
diff --git a/core/lib/Drupal/Core/Database/StatementInterface.php b/core/lib/Drupal/Core/Database/StatementInterface.php
index 4f4248df04..c16a933ed6 100644
--- a/core/lib/Drupal/Core/Database/StatementInterface.php
+++ b/core/lib/Drupal/Core/Database/StatementInterface.php
@@ -2,6 +2,13 @@
 
 namespace Drupal\Core\Database;
 
+if (PHP_VERSION_ID >= 80000) {
+  class_alias('\Drupal\Core\Database\Php8StatementInterface', '\Drupal\Core\Database\StatementInterfaceBase');
+}
+else {
+  class_alias('\Drupal\Core\Database\Php7StatementInterface', '\Drupal\Core\Database\StatementInterfaceBase');
+}
+
 /**
  * Represents a prepared statement.
  *
@@ -18,7 +25,7 @@
  *
  * @ingroup database
  */
-interface StatementInterface extends \Traversable {
+interface StatementInterface extends StatementInterfaceBase, \Traversable {
 
   /**
    * Constructs a new PDOStatement object.
@@ -73,44 +80,6 @@ public function getQueryString();
    */
   public function rowCount();
 
-  /**
-   * Sets the default fetch mode for this statement.
-   *
-   * See http://php.net/manual/pdo.constants.php for the definition of the
-   * constants used.
-   *
-   * @param $mode
-   *   One of the PDO::FETCH_* constants.
-   * @param $a1
-   *   An option depending of the fetch mode specified by $mode:
-   *   - for PDO::FETCH_COLUMN, the index of the column to fetch
-   *   - for PDO::FETCH_CLASS, the name of the class to create
-   *   - for PDO::FETCH_INTO, the object to add the data to
-   * @param $a2
-   *   If $mode is PDO::FETCH_CLASS, the optional arguments to pass to the
-   *   constructor.
-   */
-  public function setFetchMode($mode, $a1 = NULL, $a2 = []);
-
-  /**
-   * Fetches the next row from a result set.
-   *
-   * See http://php.net/manual/pdo.constants.php for the definition of the
-   * constants used.
-   *
-   * @param $mode
-   *   One of the PDO::FETCH_* constants.
-   *   Default to what was specified by setFetchMode().
-   * @param $cursor_orientation
-   *   Not implemented in all database drivers, don't use.
-   * @param $cursor_offset
-   *   Not implemented in all database drivers, don't use.
-   *
-   * @return
-   *   A result, formatted according to $mode.
-   */
-  public function fetch($mode = NULL, $cursor_orientation = NULL, $cursor_offset = NULL);
-
   /**
    * Returns a single field from the next record of a result set.
    *
@@ -142,21 +111,6 @@ public function fetchObject();
    */
   public function fetchAssoc();
 
-  /**
-   * Returns an array containing all of the result set rows.
-   *
-   * @param $mode
-   *   One of the PDO::FETCH_* constants.
-   * @param $column_index
-   *   If $mode is PDO::FETCH_COLUMN, the index of the column to fetch.
-   * @param $constructor_arguments
-   *   If $mode is PDO::FETCH_CLASS, the arguments to pass to the constructor.
-   *
-   * @return
-   *   An array of results.
-   */
-  public function fetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL);
-
   /**
    * Returns an entire single column of a result set as an indexed array.
    *
diff --git a/core/lib/Drupal/Core/Database/StatementPrefetch.php b/core/lib/Drupal/Core/Database/StatementPrefetch.php
index 3f6efdf364..49e5d831a6 100644
--- a/core/lib/Drupal/Core/Database/StatementPrefetch.php
+++ b/core/lib/Drupal/Core/Database/StatementPrefetch.php
@@ -2,6 +2,13 @@
 
 namespace Drupal\Core\Database;
 
+if (PHP_VERSION_ID >= 80000) {
+  class_alias('\Drupal\Core\Database\Php8StatementTrait', '\Drupal\Core\Database\StatementTrait');
+}
+else {
+  class_alias('\Drupal\Core\Database\Php7StatementTrait', '\Drupal\Core\Database\StatementTrait');
+}
+
 /**
  * An implementation of StatementInterface that prefetches all data.
  *
@@ -9,6 +16,7 @@
  * every row it is possible to manipulate those results.
  */
 class StatementPrefetch implements \Iterator, StatementInterface {
+  use StatementTrait;
 
   /**
    * The query string.
@@ -232,9 +240,26 @@ public function getQueryString() {
   }
 
   /**
-   * {@inheritdoc}
+   * Sets the default fetch mode for this statement.
+   *
+   * See http://php.net/manual/pdo.constants.php for the definition of the
+   * constants used.
+   *
+   * @param $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param $a1
+   *   An option depending of the fetch mode specified by $mode:
+   *   - for PDO::FETCH_COLUMN, the index of the column to fetch
+   *   - for PDO::FETCH_CLASS, the name of the class to create
+   *   - for PDO::FETCH_INTO, the object to add the data to
+   * @param $a2
+   *   If $mode is PDO::FETCH_CLASS, the optional arguments to pass to the
+   *   constructor.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::setFetchMode()
+   * @see \Drupal\Core\Database\Php8StatementTrait::setFetchMode()
    */
-  public function setFetchMode($mode, $a1 = NULL, $a2 = []) {
+  public function doSetFetchMode($mode, $a1 = NULL, $a2 = []) {
     $this->defaultFetchStyle = $mode;
     switch ($mode) {
       case \PDO::FETCH_CLASS:
@@ -373,12 +398,22 @@ public function rowCount() {
   }
 
   /**
-   * {@inheritdoc}
+   * Fetches the next row from a result set.
+   *
+   * @param int $mode
+   *   One of the PDO::FETCH_* constants. Default to what was specified by
+   *   setFetchMode().
+   *
+   * @return
+   *   A result.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::fetch()
+   * @see \Drupal\Core\Database\Php8StatementTrait::fetch()
    */
-  public function fetch($fetch_style = NULL, $cursor_orientation = \PDO::FETCH_ORI_NEXT, $cursor_offset = NULL) {
+  public function doFetch($mode) {
     if (isset($this->currentRow)) {
       // Set the fetch parameter.
-      $this->fetchStyle = isset($fetch_style) ? $fetch_style : $this->defaultFetchStyle;
+      $this->fetchStyle = !empty($mode) ? $mode : $this->defaultFetchStyle;
       $this->fetchOptions = $this->defaultFetchOptions;
 
       // Grab the row in the format specified above.
@@ -461,9 +496,22 @@ public function fetchAssoc() {
   }
 
   /**
-   * {@inheritdoc}
+   * Returns an array containing all of the result set rows.
+   *
+   * @param $mode
+   *   One of the PDO::FETCH_* constants.
+   * @param $column_index
+   *   If $mode is PDO::FETCH_COLUMN, the index of the column to fetch.
+   * @param $constructor_arguments
+   *   If $mode is PDO::FETCH_CLASS, the arguments to pass to the constructor.
+   *
+   * @return
+   *   An array of results.
+   *
+   * @see \Drupal\Core\Database\Php7StatementTrait::fetchAll()
+   * @see \Drupal\Core\Database\Php8StatementTrait::fetchAll()
    */
-  public function fetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL) {
+  public function doFetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL) {
     $this->fetchStyle = isset($mode) ? $mode : $this->defaultFetchStyle;
     $this->fetchOptions = $this->defaultFetchOptions;
     if (isset($column_index)) {
