Problem/Motivation

Drupal 11.5 (released alongside Drupal 12) changes a few things that break Commerce 3.x:

  • Sites: core/once no longer depends on core/drupal. Several Commerce libraries use the Drupal global without declaring core/drupal, so their JavaScript fails with "Drupal is not defined" (order items widget, order item edit form, order log comment form, copy link).
  • Tests: Drupal 11.5 allows Guzzle 8, where a request timeout throws NetworkTimeoutException, which is not a ConnectException (OrderTest::testLoadForUpdate()).
  • Tests: the user "Member for" display element is deprecated and hidden by default (CommerceTwigExtensionTest).
  • Coding standards: drupal/coder 9 (required by Drupal 11.5's core-dev) requires a space after match.

These were found and fixed on 4.x in #3638820: Fix Drupal 12 deprecations.

Proposed resolution

  • Add core/drupal to the affected libraries.
  • Catch Psr\Http\Client\NetworkExceptionInterface (Guzzle 7 and 8) in OrderTest.
  • Render the user created field in CommerceTwigExtensionTest instead of relying on "Member for".
  • Add the missing space after match in DashboardMetricsForm.

All changes are compatible with Drupal 10 and earlier Drupal 11 minors.

Remaining tasks

Review, commit, include in a 3.x release before Drupal 11.5.0 is out.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

jsacksick created an issue. See original summary.

jsacksick’s picture

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.