Problem/Motivation

Drupal 10.0 development


Thank you so much for the Drupal Core team

Following with


The current composer require status for this module under Drupal 10

composer create-project drupal/recommended-project:10.0.0-alpha4@alpha /var/www/html/sandboxes/drupal10betterlogin
cd  /var/www/html/sandboxes/drupal10betterlogin/
composer require drupal/betterlogin;

is having the following problem

Using version ^1.6 for drupal/betterlogin
./composer.json has been updated
Running composer update drupal/betterlogin
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/betterlogin ^1.6 -> satisfiable by drupal/betterlogin[1.6.0, 1.x-dev].
    - drupal/betterlogin[1.6.0, ..., 1.x-dev] require drupal/core ^8 || ^9 -> found drupal/core[8.0.0-beta6, ..., 8.9.x-dev, 9.0.0-alpha1, ..., 9.5.x-dev] but the package is fixed to 10.0.0-alpha4 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require drupal/betterlogin:*" to figure out if any version is installable, or "composer require drupal/betterlogin:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Further drupal-check on

composer create-project drupal/recommended-project:~9 /var/www/html/sandboxes/drupal9betterlogin

cd /var/www/html/sandboxes/drupal9betterlogin/

composer config minimum-stability dev

composer require drupal/betterlogin

composer require drupal/core-dev --with-all-dependencies
composer require mglaman/drupal-check --dev
composer require phpspec/prophecy-phpunit:^2 --dev 

php vendor/bin/drupal-check -d web/modules/contrib/betterlogin/

Output:

betterlogin--drupal-check--report.txt

 2/2 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------- 
  Line   src/EventSubscriber/BetterLoginSubscriber.php                          
 ------ ----------------------------------------------------------------------- 
  42     Parameter $event of method                                             
         Drupal\betterlogin\EventSubscriber\BetterLoginSubscriber::checkForRed  
         irection() has typehint with deprecated class                          
         Symfony\Component\HttpKernel\Event\GetResponseEvent:                   
         since Symfony 4.3, use RequestEvent instead                            
 ------ ----------------------------------------------------------------------- 


 [ERROR] Found 1 error 

Proposed resolution

  • Change core_version_requirement: ^8 || ^9 to core_version_requirement: ^8 || ^9 || ^10 in the betterlogin.info.yml file
  • Support Drupal ~10 and change all deprecated packages, classes, functions, asset libraries to the Drupal 10 way
  • Real physical testing with Drupal ~10

Remaining tasks

  • ➖ Change to core_version_requirement: ^8 || ^9 || ^10 in the betterlogin.info.yml file
  • ➖ This will ease the work on further issues
  • ➖ Real physical testing with Drupal ~10

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A

Comments

Rajab Natshah created an issue. See original summary.

rajab natshah’s picture

Title: Support Drupal 10 and update all use of deprecations in the Better Login module » Support Drupal 10 and update all use of deprecation in the Better Login module
rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new813 bytes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Status: Active » Closed (duplicate)
Related issues: +#3286226: Automated Drupal 10 compatibility fixes

Closing as duplicate
Moving the conversation to
#3286226: Automated Drupal 10 compatibility fixes