ContainerInterface DI missing on StripeReview.php

Created on 18 February 2025, 4 days ago

After updating Drupal to 10.4.2 and Commerce Stripe to 1.2, I got this error:

Fatal error: Could not check compatibility between Drupal\commerce_stripe\Plugin\Commerce\CheckoutPane\StripeReview::create(Drupal\commerce_stripe\Plugi
n\Commerce\CheckoutPane\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, ?Drupal\commerce_checkout\Plugin\Commerce\C
heckoutFlow\CheckoutFlowInterface $checkout_flow = null) and Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\CheckoutPaneBase::create(Symfony\Comp
onent\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, ?Drupal\commerce_checkout\Plugin\Commerce
\CheckoutFlow\CheckoutFlowInterface $checkout_flow = null), because class Drupal\commerce_stripe\Plugin\Commerce\CheckoutPane\ContainerInterface is not
available in /modules/contrib/commerce_stripe/src/Plugin/Commerce/CheckoutPane/StripeReview.php on line 56

The StripeReview.php file is missing:
use Symfony\Component\DependencyInjection\ContainerInterface;

πŸ› Bug report
Status

Active

Version

1.2

Component

Stripe Checkout

Created by

πŸ‡¬πŸ‡§United Kingdom gillarf

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

Comments & Activities

  • Issue created by @gillarf
  • πŸ‡ΊπŸ‡ΈUnited States TomTech

    Hi @gillarf,

    Thanks for the report!

    The StripeReview.php class does not override/implement the create() method, so this is not caused by the class OOTB.

    Given the message you posted, the most likely cause is a patch is being applied that adds a create() method, but does not add the use statement.

    I would first confirm whether the patch you are applying is still desired. (Has the functionality since been added?)

    If you still need the patch, you should check the issue where you obtained the patch, to see if there is an updated one.

    If this is a custom patch, you'll need to fix the patch locally.

Production build 0.71.5 2024