Problem/Motivation

When trying to add a payment method configuration a fatal error occurs: Fatal error: Call to undefined method Drupal\Core\StringTranslation\TranslationWrapper::setStringTranslation() in /Users/ricovandevin/Sites/community/8/mollie_payment/modules/payment/src/Plugin/Payment/Status/PaymentStatusManager.php on line 94. Also the use of TranslationWrapper is now deprecated. The same fatal error is shown when viewing a node with a payment form field.

This problem occurs with Drupal 8.0.0-dev (commit 1d1fe19702f5dc6894acc45431b1d0c85ab306d7) and Payment 8.x-2.x-dev (commit 626df3660066980ded45a1accc643aa1ae855847).

Proposed resolution

Avoid the use of setStringTranslation. Replace all uses of TranslationWrapper by TranslatableString.

Remaining tasks

  • Create a patch that addresses the fatal error.
  • Replace all uses of TranslationWrapper.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ricovandevin created an issue. See original summary.

ricovandevin’s picture

Patched to solve fatal error.

ricovandevin’s picture

Issue summary: View changes
s_leu’s picture

Xano’s picture

Please file this as a pull request on https://github.com/bartfeenstra/drupal-payment. We cannot work on patches here anymore, because we require a more flexible testing infrastructure than the one drupal.org provides.

Xano’s picture

Status: Needs review » Closed (won't fix)