Change record status: 
Project: 
Introduced in branch: 
11.4.x
Introduced in version: 
11.4.0
Description: 

Usage of TRUNCATE ::execute() method is deprecated: calling code should not rely on its return value. An exception will be thrown starting Drupal 13.

Use the ::executeSafe() method, that is not returning any value.

Before:


  public function deleteAll() {
    try {
      $return = $this->connection->truncate($this->bin)->execute();
    }
    catch ...
  }

After:


  public function deleteAll() {
    try {
      $this->connection->truncate($this->bin)->executeSafe();
    }
    catch ...
  }

Impacts: 
Module developers