Hi
When I check the module with the drupal-check command I found some deprecated methods in Drupal 8.5.0
5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ----------------------------------------------------------------------
Line mass_pwreset.batch.inc
------ ----------------------------------------------------------------------
83 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
96 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ -------------------------------------------------------------------------------
Line mass_pwreset.module
------ -------------------------------------------------------------------------------
168 Call to deprecated method strlen() of class Drupal\Component\Utility\Unicode:
in Drupal 8.6.0, will be removed before Drupal 9.0.0. Use
mb_strlen() instead.
------ -------------------------------------------------------------------------------
[ERROR] Found 3 errors
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3097578-6.patch | 3.12 KB | Pooja Ganjage |
| #2 | removed-deprecated-methods.patch | 1.59 KB | sahana _n |
Issue fork mass_pwreset-3097578
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
sahana _n commentedI created the patch for this please review the patch.
Comment #3
damienmckennaComment #4
jasonluttrellTo get the module working in Drupal 9, I applied this patch #3097578-2, plus #3121828-1.
I found that I also needed to tweak mass_pwreset.info.yml by commenting out the "core" line and inserting
"core_version_requirement: ^8.8 || ^9"as well.I also ran into another issue, which I created (#3174723).
Otherwise, I found no issues with applying this specific patch. Thanks for sharing.
Comment #5
damienmckennaPlease combine the other fix with this one, and make the info file change - there's only need for one patch, given how small the module is. Thank you.
Comment #6
Pooja Ganjage commentedHi,
I am creating patch and combine all fixes in one patch.
Please review the patch.
Thanks.
Comment #7
Pooja Ganjage commentedComment #8
jasonluttrellWorks for me. Thanks.
Comment #9
joestewart commentedApplied patch and tested successfully.
Comment #11
stijnhau commentedAny idea when this can be included?
Comment #13
shrop commentedThanks everyone! This has been merged and released in a new 2.x dev branch and semver release https://www.drupal.org/project/mass_pwreset/releases/2.0.0-beta1.
Comment #14
shrop commentedComment #16
mukesh88 commentedWhen I check the module with drupal-check and analysis found some deprecated methods in Drupal 8.9.17
drupal-check -ad modules/contrib/mass_pwreset
5/5 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ --------------------------------------------------------------------
Line mass_pwreset.module
------ --------------------------------------------------------------------
167 Call to static method strlen() on an unknown class Unicode.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
177 Function drupal_random_bytes not found.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
178 Variable $len might not be defined.
------ --------------------------------------------------------------------
[ERROR] Found 3 errors
Comment #17
mukesh88 commented