Start a 2.0.x branch for the Generate Password module to support Drupal ^9.4 || ^10

Created on 2 February 2023, over 1 year ago
Updated 7 February 2023, over 1 year ago

Problem/Motivation

As part of the work in πŸ“Œ Automated Drupal 10 compatibility fixes Fixed

Joshua β†’
If we are using moduleHandler()->hasImplementations, we can't keep the D8 compatibility, as this method was introduced in Drupal 9.4.

Furthermore, while running the tests locally, I got the following deprecation notice:

3x: user_password() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Password\PasswordGeneratorInterface::generate() instead. See https://www.drupal.org/node/3153113
3x in GenpassTest::testGenpassConfigsAndCreateUsersByAdmin from Drupal\Tests\genpass\FunctionalJavascript

But I can not seem to find any code using, user_password() and I have no idea what is causing this deprecation notice. Maybe one of the maintainers can rerun the tests using PHP >= 8.1, to see if that problem also appears on remote?

  • Ditching old ways is good
  • Adopting new better ways is better

Managing between that is a tricky business
Let us see how the final changes will look like.

Proposed resolution

Greg β†’

Make 8.x-1.x compatible with both 8.x and 9.x (at this point I don't think we should invest much time in 8, honestly).
Make 2.0.x compatible with both 9.x and 10.x.
The upgrade flow is for 8.x-and 9.x to get on 9.x core with 8.x-1.x. I believe this is already possible and we can say that 8.x-1.x is no longer actively developed. Then once core is at 9.x people should upgrade to genpass 2.x and can upgrade core to 10.x.

Either of these 3 plans (yours, my first modification to yours to drop 10 support from 8.x-1.x branch, the 3rd one here to drop 10 support form 8.x-1.x and adjust the upgrade flow) works for me.

with Joshua β†’ 's notes too.

Although if we want to keep the D9 compatibility we have to define core_version_requirement: ^9.4 || ^10, as explained in #19:

If we are using moduleHandler()->hasImplementations, we can't keep the D8 compatibility, as this method was introduced in Drupal 9.4

Paving the way for a smooth upgrade process with

  • 2.0.x will have ^9.4 || ^10
  • 8.x-1.x will have ^8 || ^9

Remaining tasks

  • βœ… File an issue
  • βœ… Addition/Change/Update/Fix
  • βœ… Testing to ensure no regression
  • βœ… Automated unit testing coverage

    Development version: 2.0.x-dev β†’ updated 7 Feb 2023 at 09:35 UTC

  • βœ… Automated functional testing coverage
  • βž– UX/UI designer responsibilities
  • βž– Readability
  • βž– Accessibility
  • βž– Performance
  • βœ… Security
  • βž– Documentation
  • βœ… Code review by maintainers
  • βœ… Full testing and approval
  • βœ… Credit contributors
  • βœ… Review with the product owner
  • βœ… Release notes snippet
  • βœ… Release genpass-2.0.0-alpha1 β†’

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • Issue #3338638 β†’ : Started a 2.0.x branch for the Generate Password module to support Drupal ^9.4 || ^10
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024