16/16 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

------ -----------------------------------------------------------------------------------
Line hacked.report.inc
------ -----------------------------------------------------------------------------------
167 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_strtolower() instead.
167 Call to deprecated method strtolower() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_strtolower() instead.
------ -----------------------------------------------------------------------------------

------ ----------------------------------------------------------------
Line src/hackedProjectWebDevDownloader.php
------ ----------------------------------------------------------------
109 Call to deprecated function file_prepare_directory():
in Drupal 8.7.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().
110 Call to deprecated function file_prepare_directory():
in Drupal 8.7.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().
------ ----------------------------------------------------------------

------ ----------------------------------------------------------------
Line src/hackedProjectWebDownloader.php
------ ----------------------------------------------------------------
40 Call to deprecated function file_prepare_directory():
in Drupal 8.7.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().
58 Call to deprecated function file_prepare_directory():
in Drupal 8.7.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().
------ ----------------------------------------------------------------

------ -------------------------------------------------------------------------------
Line src/hackedProjectWebFilesDownloader.php
------ -------------------------------------------------------------------------------
38 Call to deprecated function file_prepare_directory():
in Drupal 8.7.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\File\FileSystemInterface::prepareDirectory().
119 Call to deprecated method substr() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_substr() instead.
122 Call to deprecated function file_unmanaged_delete_recursive():
in Drupal 8.7.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\File\FileSystemInterface::deleteRecursive().
------ -------------------------------------------------------------------------------

[ERROR] Found 9 errors

Comments

joy29 created an issue. See original summary.

rudranil29’s picture

StatusFileSize
new4.44 KB

patch for drupal 9 compatibility

rudranil29’s picture

Assigned: rudranil29 » Unassigned
Status: Active » Needs review
damienmckenna’s picture

Title: Drupal 9 Deprecated Code Report » Drupal 9 Deprecated Code Report for Hacked module
driverok’s picture

Status: Needs review » Needs work

After applying #2 there are still several errors:

Drupal check results

16/16 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------------------------------------------------------
  Line   hacked.report.inc
 ------ ------------------------------------------------------------------------------------------------------------------
  87     Call to deprecated constant UPDATE_CURRENT: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
         \Drupal\update\UpdateManagerInterface::CURRENT instead.
  92     Call to deprecated constant UPDATE_NOT_CHECKED: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
         \Drupal\update\UpdateFetcherInterface::NOT_CHECKED instead.
  98     Call to deprecated constant UPDATE_NOT_CHECKED: Deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use
         \Drupal\update\UpdateFetcherInterface::NOT_CHECKED instead.
 ------ ------------------------------------------------------------------------------------------------------------------

 ------ ---------------------------------------------------------------------------------------------------------------------
  Line   src/hackedProjectWebDevDownloader.php
 ------ ---------------------------------------------------------------------------------------------------------------------
  110    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.
  111    Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.
 ------ ---------------------------------------------------------------------------------------------------------------------

 ------ ---------------------------------------------------------------------------------------------------------------------
  Line   src/hackedProjectWebDownloader.php
 ------ ---------------------------------------------------------------------------------------------------------------------
  36     Call to deprecated function file_directory_temp():
         in drupal:8.8.0 and is removed from drupal:9.0.0. Use
         \Drupal\Core\File\FileSystemInterface::getTempDirectory() instead.
  41     Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.
  59     Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.
 ------ ---------------------------------------------------------------------------------------------------------------------

 ------ ---------------------------------------------------------------------------------------------------------------------
  Line   src/hackedProjectWebFilesDownloader.php
 ------ ---------------------------------------------------------------------------------------------------------------------
  39     Call to deprecated constant FILE_CREATE_DIRECTORY: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
         \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY.
  95     Call to deprecated constant FILE_EXISTS_REPLACE: Deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use
         \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE.
  110    Call to deprecated function archiver_get_archiver():
         in drupal:8.8.0 and is removed from drupal:9.0.0. Instead,
         get plugin.manager.archiver service from container and call getInstance()
         method on it. For example $archiver->getInstance(['filepath' => $file]);
 ------ ---------------------------------------------------------------------------------------------------------------------


 [ERROR] Found 11 errors
driverok’s picture

Please check the combined patch with fixes for all Drupal 9 compatibility fixes.

swatichouhan012’s picture

Status: Needs work » Needs review
StatusFileSize
new315.26 KB

@driverok patch looks good, now there is no deprecated code.

smrutha’s picture

Status: Needs review » Reviewed & tested by the community

Patch #6 looks good.

drupal-check -d web/modules/contrib/hacked
16/16 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

[OK] No errors

ivnish’s picture

Status: Reviewed & tested by the community » Needs work

driverok, please fix patch to last dev version

joestewart’s picture

Status: Needs work » Needs review
StatusFileSize
new3.45 KB

Rerolled with core_version_requirement addition.

eric_a’s picture

Status: Needs review » Needs work

@joestewart, thanks a lot for the reroll.

Did a quick review of the file system stuff:
- non-static method 'deleteRecursive' should not be called statically. Given that @ivnsih choose to use the \Drupal::service('file_system') pattern when fixing #3147733: Automated Drupal 9 compatibility fixes, that would be just fine here. (See commit 40b974b)

eric_a’s picture

Assigned: Unassigned » eric_a
Related issues: +#3147733: Automated Drupal 9 compatibility fixes, +#3183786: Drupal 9 Compatibilty
StatusFileSize
new2.31 KB

I'll upload a patch to address #11 in a minute.
In the meantime here's my plain dumb reroll of #6, without any fix for file_unmanaged_delete_recursive(). Not very useful but I needed it because reasons. :-)

eric_a’s picture

Assigned: eric_a » Unassigned
Status: Needs work » Needs review
StatusFileSize
new640 bytes
new3.46 KB

This is #10 with #11 addressed.

nathaniel’s picture

Thanks @Eric_A patch applies cleanly. Upgrade status is happy with it. Will test on D9 soon.

nathaniel’s picture

Status: Needs review » Needs work

Looks like something changed. Drupal 9.2.1 error running the report.

https://www.drupal.org/node/2999951/revisions/view/11422137/11767365

1. hackedProjectWebFilesDownloader.php line 110

$archiver = \Drupal::service('plugin.manager.archiver')->getInstance(['filepath' => $file]);

2. Same file. Looks like this can be removed now:

use Drupal\Component\Utility\Unicode;
star-szr’s picture

Status: Needs work » Needs review
StatusFileSize
new3.49 KB
new732 bytes

@Nathaniel, I ran into the same thing. It looks like there was a draft change record that didn't get the necessary revisions before publishing.

Here's a new patch. IMO removing the unused use is out of scope here so not including that.

nathaniel’s picture

Status: Needs review » Reviewed & tested by the community

Yep, that works! The patch applies. The report runs without any issues. I can view the file diff.

  • ivnish committed 093cafa on 8.x-2.x authored by Cottser
    Issue #3075667 by Eric_A, Cottser, joy29, driverok, joestewart,...
ivnish’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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