Spin-off issue from #3042774-18: Drupal 9 Deprecated Code Report.

Feeds uses the deprecated function file_prepare_directory(). This should be replaced with the file_system service:

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().

Additionally, this function can get removed from FeedsUnitTestCase.php. Having functions redeclared in that file can cause issues sometimes as reported in #2919048: FeedsUnitTest breaks any file.inc unit tests that run after it.. But we can at least remove one of these redeclarations here.

Patch will follow.

Comments

MegaChriz created an issue. See original summary.

megachriz’s picture

Status: Active » Needs review
StatusFileSize
new10.09 KB
megachriz’s picture

StatusFileSize
new10.85 KB
new1.62 KB

This should fix the test failure.

megachriz’s picture

Status: Needs review » Fixed

Cool, all tests are passing. Committed #3.

  • MegaChriz committed bd5136a on 8.x-3.x
    Issue #3093488 by MegaChriz: Replaced deprecated file function calls...
megachriz’s picture

Status: Fixed » Closed (fixed)

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

kristen pol’s picture

Issue tags: +Drupal 9 compatibility

Per a Slack discussion with Gábor Hojtsy regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing tag cleanup here based on that discussion.