- Issue created by @hyperlinked
- Merge request !286Issue #3464144 by hyperlinked, jsacksick: Replace UserAuthInterface with UserAuthenticationInterface for Drupal 11 Support → (Merged) created by hyperlinked
- 🇺🇸United States hyperlinked San Jose, CA
FYI, if you're seeing an error message that looks something like the following, you may be dealing with a module that has conflicts between the old UserAuthInterface and the new UserAuthenticationInterface:
"TypeError: Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\Login::__construct(): Argument #8 ($user_auth) must be of type Drupal\user\UserAuthInterface, Drupal\mail_login\AuthDecorator given"If you had a problem with Mail Login and your search led you here, you need to downgrade to Mail Login 3.x.
- Status changed to Needs review
5 months ago 5:57am 28 July 2024 - 🇮🇱Israel jsacksick
I'm wondering if we shouldn't use the union type and allow both interfaces?
UserAuthInterface|UserAuthenticationInterface
this way we can support both? But maybe not necessary since Commerce 3 is only D10.3+ - 🇺🇸United States hyperlinked San Jose, CA
I'll defer judgement on that since this is my first time encountering this exact scenario with compatibility issues for a drop-in replacement in Core.
I'd presume it'd be the nice thing to do support both until it's actually dropped in Drupal 12. There may be other modules that continue to reference the old methods and those may break Commerce Checkout if only the new methods are supported. Case in point is Mail Login 4.x and that's the module that brought me here.
I'm not familiar with using a union type to address this scenario to provide options. How would that work?
- 🇮🇱Israel jsacksick
Ok sorry, I did this too quickly... Based on the interface, we have to call a different method... Perhaps dropping support of the old interface is the cleanest solution here... But I wonder why the tests are failing then?
-
jsacksick →
committed af0c8ed7 on 3.0.x authored by
hyperlinked →
Issue #3464144 by hyperlinked, jsacksick: Replace UserAuthInterface with...
-
jsacksick →
committed af0c8ed7 on 3.0.x authored by
hyperlinked →
- Status changed to Fixed
5 months ago 12:47pm 29 July 2024 - 🇮🇳India vipin.j
For members who already upgraded Drupal Core to ^10.3 and wanted to update Mail Login to ^4.0.
here is the Commerce Core 8.x-2.39 compatible patch for this issue queue.
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇮🇱Israel jsacksick
I think the right fix is to mark Commerce 2.x incompatible with Mail Login 4 as Commerce isn't going to be compatible with D11 and retain compatibility with D9 and D10 < 10.3
- 🇳🇴Norway zaporylie
@vipin.j mail_login 4.0.3 supports both old and the new interface so you feel free to upgrade.