file_unmanaged_copy - Any service alternatives?
This changed in Drupal 8.7.0
See https://www.drupal.org/node/3006851
try {
  \Drupal::service('file_system')-&gt;copy($source, $destination, $replace);
} 
catch (\Drupal\Core\File\Exception\FileException $e) {
    // Log or set message or doing something else.
}