Problem

We are using a Drupal site setup with Drupal Core: 10.3.1 and Commerce Core: 2.39. While upgrading to mail_login: 4.0.1 from the old version 3.0.0, the site installation with drush command failed with following error:

TypeError: Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CompletionRegister::__construct(): Argument #11 ($user_auth) must be of type Drupal\user\UserAuthInterface, Drupal\mail_login\AuthDecorator given, called in /var/www/html/web/modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutPane/CompletionRegister.php on line 139

CommentFileSizeAuthor
#4 mail_login-3462553.patch1.97 KBananya.k

Comments

vipin.j created an issue. See original summary.

vipin.j’s picture

Issue summary: View changes
klemendev’s picture

Does this also happen in 4.0.2?

ananya.k’s picture

Status: Active » Needs review
StatusFileSize
new1.97 KB

@vipin.j,

I have resolved the issues. Please refer to the attached patch.

jan-e’s picture

pavelculacov’s picture

Fixed

vipin.j’s picture

The issue was Mail Login compatibility with Commerce Checkout. Eventually that problem is fixed with the Commerce Core issue queue #3464144, but since this fix is applicable to Commerce Core release 3.x only, which is still no released yet. We still can not upgrade Mail Login to ^4.0, and if we already migrated Drupal Core to ^10.3 release, now we have to be on Mail Login 3.0.0. Because to migrate on 3.0.1, Drupal Core must be <10.3 because of the constraint ^9.1 || ^10,<10.3

If you are using Commerce Core 8.x-2.39 release with Drupal Core ^10.3, you can either be on Mail Login: 3.0.0 or you can just apply the patch #11 to Commerce Core 8.x and then you'll be able to migrate to Mail Login: ^4.0

vipin.j’s picture

@ananya.k the patch from #4 might work, but it's not recommended approach. As with Drupal Core 11 release the interface UserAuthInterface is gonna marked as deprecated, and you are reusing UserAuthInterface by replacing the recommended interface UserAuthenticationInterface. That means, you're just providing a solution by going backward, which doesn't make sense.

@see https://www.drupal.org/project/drupal/issues/3427298

vipin.j’s picture

Status: Needs review » Closed (outdated)

Closing the issue queue, as the problem was at Commerce Core end and not Mail Login, which is fixed.