In order to make the Gutenberg module ready for Drupal 9, we need to remove the deprecated function.

Call to deprecated function file_prepare_directory(). Deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0.
Use ​\​Drupal​\​Core​\​File​\​FileSystemInterface::prepareDirectory().

in file modules​/​contrib​/​gutenberg​/​src​/​Controller​/​MediaController.php
line 135

As suggested in the message, we need to replace this function to a proper object that handles the directories.

CommentFileSizeAuthor
#9 3074249-8.patch381 bytessahana _n
#3 3074249-3.patch1.81 KBaleevas

Comments

sayco created an issue. See original summary.

sayco’s picture

Title: Depricated function file_prepare_directory() » Deprecated function file_prepare_directory()
aleevas’s picture

Status: Needs work » Needs review
StatusFileSize
new1.81 KB

Here is my first patch for this issue.
Hope it's will fit good

marcofernandes’s picture

Status: Needs review » Fixed

All good, Alexey. Thanks.

rpsu’s picture

Umm. This change breaks sites using (still supported) Drupal 8.6.x, and should probably be committed only after Drupal 8.8. is releases.

Optionally .info.yml file should explicitly state requirement to Drupal core >= 8.7

rpsu’s picture

Status: Fixed » Needs work
sahana _n’s picture

Status: Needs work » Needs review

updated the info.yml file please review the patch.

sahana _n’s picture

StatusFileSize
new381 bytes

marcofernandes’s picture

Status: Needs review » Fixed

Drupal 8.8 is here. So I guess we can close this one 🙃

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.