Issue #3245859 by yas, baldwinlouie: Change deprecated function file_save_data to \Drupal::service('file.repository')->writeData()