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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | mail_login-3462553.patch | 1.97 KB | ananya.k |
Comments
Comment #2
vipin.j commentedComment #3
klemendev commentedDoes this also happen in 4.0.2?
Comment #4
ananya.k commented@vipin.j,
I have resolved the issues. Please refer to the attached patch.
Comment #5
jan-e commentedIs not UserAuthInterface deprecated?
https://www.drupal.org/project/drupal/issues/3427298
https://www.drupal.org/project/mail_login/issues/3456996
Comment #6
pavelculacov commentedFixed
Comment #7
vipin.j commentedThe 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.3If 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
Comment #8
vipin.j commented@ananya.k the patch from #4 might work, but it's not recommended approach. As with Drupal Core 11 release the interface
UserAuthInterfaceis gonna marked as deprecated, and you are reusingUserAuthInterfaceby replacing the recommended interfaceUserAuthenticationInterface. 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
Comment #9
vipin.j commentedClosing the issue queue, as the problem was at Commerce Core end and not Mail Login, which is fixed.