Change record status: 
Project: 
Introduced in branch: 
8.8.x
Introduced in version: 
8.8.0-alpha1
Description: 

To prepare for Drupal 9, the order of parameters for DatabaseFileUsageBackend has changed.

in #2801777: Give users the option to prevent drupal from automatically marking unused files as temporary the FileUsageBase class constructor started taking the config factory service as an optional parameter to be made required in Drupal 9. At the same time, DatabaseFileUsageBackend added the config factory service as an optional third parameter, after the optional second parameter of $table.

Before

  /**
   * Construct the DatabaseFileUsageBackend.
   *
   * @param \Drupal\Core\Database\Connection $connection
   *   The database connection which will be used to store the file usage
   *   information.
   * @param string $table
   *   (optional) The table to store file usage info. Defaults to 'file_usage'.
   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
   *   (optional) The config factory.
   */
  public function __construct(Connection $connection, $table = 'file_usage', ConfigFactoryInterface $config_factory = NULL)

After

The Config Factory is now required, followed by the database connection, and finally the optional $table parameter. A BC layer has been provided for Drupal 8 and is removed from Drupal 9

In Drupal 9:

  /**
   * Construct the DatabaseFileUsageBackend.
   *
   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
   *   The config factory.
   * @param \Drupal\Core\Database\Connection $connection
   *   The database connection which will be used to store the file usage
   *   information.
   * @param string $table
   *   (optional) The table to store file usage info. Defaults to 'file_usage'.
   */
  public function __construct(ConfigFactoryInterface $config_factory, Connection $connection, $table = 'file_usage')
Impacts: 
Module developers
Site templates, recipes and distribution developers