You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trigger_error('file_delete() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::delete() instead. See https://www.drupal.org/node/3021663.', E_USER_DEPRECATED);
826
832
returnfile_delete_multiple([$fid]);
827
833
}
828
834
@@ -833,14 +839,22 @@ function file_delete($fid) {
833
839
* file usages instead. That will automatically mark the file as temporary and
834
840
* remove it during cleanup.
835
841
*
836
-
* @param $fid
837
-
* The file id.
842
+
* @param $fids
843
+
* An array of file ids.
844
+
*
845
+
* @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0.
846
+
* Use \Drupal\Core\Entity\EntityStorageInterface::delete() instead.
@trigger_error('file_delete_multiple() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::delete() instead. See https://www.drupal.org/node/3021663.', E_USER_DEPRECATED);
Copy file name to clipboardExpand all lines: core/modules/file/tests/src/Kernel/FileLegacyTest.php
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -50,17 +50,31 @@ public function testFileUrlDeprecation() {
50
50
/**
51
51
* @expectedDeprecation file_load_multiple() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\file\Entity\File::loadMultiple(). See https://www.drupal.org/node/2266845
52
52
* @expectedDeprecation file_load() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\file\Entity\File::load(). See https://www.drupal.org/node/2266845
53
+
* @expectedDeprecation file_delete() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::delete() instead. See https://www.drupal.org/node/3021663.
54
+
* @expectedDeprecation file_delete_multiple() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityStorageInterface::delete() instead. See https://www.drupal.org/node/3021663.
0 commit comments