This error occurs when checking for deprecations in Drupal 9. Message:

 160    Call to deprecated function file_save_data():
         in drupal:9.3.0 and is removed from drupal:10.0.0. Use
           \Drupal\file\FileRepositoryInterface::writeData() instead.


file_save_data, file_copy and file_move are deprecated and replaced with a service that implements \Drupal\file\FileRepositoryInterface.

Before After
file_save_data() \Drupal::service('file.repository')->writeData()
file_move() \Drupal::service('file.repository')->move()
file_copy() \Drupal::service('file.repository')->copy()


Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!