All Deprecated functions like drupal_set_message(), file_upload_max_size(), file_prepare_directory() and deprecated constant FILE_CREATE_DIRECTORY needs to be replaced.

Comments

ankithashetty created an issue. See original summary.

ankithashetty’s picture

Status: Active » Needs review
StatusFileSize
new5.13 KB

Replaced all deprecated code in the following patch. Please review the same.

Thank You.

ankithashetty’s picture

Updated the patch from #2. Please review the new patch attached below.

~vendor/bin/drupal-check .
 15/15 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

                                                                                                                       
 [OK] No errors       
meghasharma’s picture

Assigned: Unassigned » meghasharma
meghasharma’s picture

Status: Needs review » Needs work
meghasharma’s picture

Assigned: meghasharma » Unassigned
Status: Needs work » Needs review
StatusFileSize
new10.98 KB
new3.59 KB

have fixed coding standard errors.
ran rector tools on tranding images module: no errors reported

my_site_name_dir % vendor/bin/rector process web/modules/contrib/trending_images
Rector 0.8.x-dev@8896f0a
Config file: rector.yml

 45/45 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

                                                                                                                        
 [OK] Rector is done!                                                                                                   
                                                                                                                       
meghasharma’s picture

Issue tags: +DIACWSep2020
msuthars’s picture

Assigned: Unassigned » msuthars
msuthars’s picture

Assigned: msuthars » Unassigned
Status: Needs review » Needs work

@meghasharma Please fix these issues also.

Upgrade Status Report
--------------------------------------------------------------------------------
Trending Images

1 error found.

modules/contrib/trending_images/src/Plugin/Field/FieldFormatter/TrendingImagesFormatter.php:
┌─────────────────────────────────────────────────────----┐
│ STATUS │ LINE │ MESSAGE │
├─────────────────────────────────────────────────────----┤
│ Fix now │ 86 │ Call to deprecated method getStorage() of class │
│ │ │Drupal\Core\Entity\EntityManager. Deprecated in drupal:8.0.0 │
│ │ │ and is removed from drupal:9.0.0. Use │
│ │ │ Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() │
│ │ │ instead. │
│ │ │ │
└────────────────────────────────────────────────────────┘

modules/contrib/trending_images/src/TrendingImagesService.php:
┌───────────────────────────────────────────────────────┐
│ STATUS │ LINE │ MESSAGE │
├───────────────────────────────────────────────────────┤
│ Ignore │ 107 │ Call to deprecated method isSubclassOf() of class │
│ │ │ Drupal\Core\Entity\EntityTypeInterface. Deprecated in │
│ │ │ drupal:8.3.0 and is removed from drupal:10.0.0. Use │
│ │ │ Drupal\Core\Entity\EntityTypeInterface::entityClassImplement │
│ │ │ s() instead. │
│ │ │ │
└────────────────────────────────────────────────────────┘

karishmaamin’s picture

Status: Needs work » Needs review
StatusFileSize
new11.71 KB
new1.27 KB

Fixed issue mentioned in #9, please review