Call to deprecated function file_scan_directory(): in drupal:8.8.0 and is removed from drupal:9.0.0.

Comments

osab created an issue. See original summary.

osab’s picture

Issue summary: View changes
StatusFileSize
new2.55 KB

added patch according to https://www.drupal.org/node/3038437

osab’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: deprecated-file_scan_directory-3072417-1.patch, failed testing. View results

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new1.31 KB
new2.65 KB

minor codestyle fix, btw both tests pass locally

andypost’s picture

btw this Deprecated in 8.8 https://www.drupal.org/node/3038437 so will fail on 8.7 (default test branch)

Status: Needs review » Needs work

The last submitted patch, 5: 3072417-5.patch, failed testing. View results

osab’s picture

Assigned: osab » Unassigned
andypost’s picture

Title: Call to deprecated function file_scan_directory() in CacheExampleForm.php » [8.8 core] Call to deprecated function file_scan_directory() in CacheExampleForm.php
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.

swatichouhan012’s picture

Status: Needs work » Needs review
Issue tags: +VbContribution2020
StatusFileSize
new2.46 KB
new1.56 KB

I have updated patch to fix test fail, kindly review.

andypost’s picture

Thanks for the patch!
While we are polishing form it should use new suggested approach for DI, see example in https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Form%21Fo...

valthebald’s picture

Version: 8.x-1.x-dev » 3.x-dev
Issue tags: +Needs backport to 9.x
valthebald’s picture

StatusFileSize
new3.42 KB

As suggested in #13, moving injection into create()

Not all services have related traits, so I left assignments as they are

jungle’s picture

Status: Needs review » Reviewed & tested by the community

The fix is straight. It's RTBC, to me. Thanks!

  • jungle committed ae9e698 on 3.x authored by valthebald
    Issue #3072417 by andypost, swatichouhan012, osab, valthebald: [8.8 core...

  • jungle committed 3d7dffd on 8.x-1.x authored by valthebald
    Issue #3072417 by andypost, swatichouhan012, osab, valthebald: [8.8 core...
valthebald’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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