In your Drupal status report, you may see an warning like this for versions 8.8.0 or higher:
You are using deprecated configuration for the temporary files path. Remove the configuration and add the following to settings.php. $settings["file_temp_path"] = "/mnt/tmp/yoursubscription"
This setting will be enforced in Drupal 9 and above. To resolve it and to avoid having to hard-code the path, use the following code instead:
$settings['file_temp_path'] = '/mnt/tmp/' . $_ENV['AH_SITE_GROUP'] . '.' . $_ENV['AH_SITE_ENVIRONMENT'];
This will use your site's environment variables to determine the correct directory to use. This is best done inside the IF block that has the require line, and put the above line just after that line.