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

Command icon 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

Sahana _N created an issue. See original summary.

sahana _n’s picture

Status: Active » Needs review
StatusFileSize
new1.59 KB

I created the patch for this please review the patch.

damienmckenna’s picture

Title: Drupal 9 compatability » Drupal 9 compatability for Mass Password Reset module
jasonluttrell’s picture

To 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.

damienmckenna’s picture

Status: Needs review » Needs work

Please 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.

Pooja Ganjage’s picture

StatusFileSize
new3.12 KB

Hi,

I am creating patch and combine all fixes in one patch.

Please review the patch.

Thanks.

Pooja Ganjage’s picture

Status: Needs work » Needs review
jasonluttrell’s picture

Works for me. Thanks.

joestewart’s picture

Status: Needs review » Reviewed & tested by the community

Applied patch and tested successfully.

gruda made their first commit to this issue’s fork.

stijnhau’s picture

Any idea when this can be included?

  • shrop committed 2c94672 on 8.x-1.x authored by Pooja Ganjage
    Issue #3097578 by Sahana _N, Pooja Ganjage, gruda, DamienMcKenna,...
shrop’s picture

Status: Reviewed & tested by the community » Fixed

Thanks 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.

shrop’s picture

Title: Drupal 9 compatability for Mass Password Reset module » Drupal 9 compatibility for Mass Password Reset module

Status: Fixed » Closed (fixed)

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

mukesh88’s picture

StatusFileSize
new1.05 KB

When 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

mukesh88’s picture