I tried to update Drupal Commerce, before updating core to 8.6.0, with composer update drupal/commerce --with-dependencies.

Now I get the following error for each page.

Fatal error: Declaration of Drupal\commerce_price\Repository\CurrencyRepository::get($currency_code, $locale = NULL) must be compatible with CommerceGuys\Intl\Currency\CurrencyRepositoryInterface::get($currencyCode, $locale = NULL, $fallbackLocale = NULL) in C:...\modules\contrib\commerce\modules\price\src\Repository\CurrencyRepository.php on line 20

  • Something went wrong with your update, and now your dependencies are in incompatible versions. Your commerceguys/intl version is not the v1.0.0 that Commerce 2.7 and newer need. "composer why commerceguys/intl" will tell you more. – Bojan Zivanovic Sep 7 '18 at 8:53
  • I'm on commerce 2.6.0 "why" says it needs "Intl 0.7" 'composer require commerceguys/intl' says "using v1.0" I change my .json file to "require commerce 2.7@" but that didn't update because my commerce_order requires 2.6.0 Would it be easier to revert to the backup created just before trying the commerce update or find instruction on how to change my commerce/intl library? – 8en Sep 7 '18 at 18:04
  • Follow the official update instructions at docs.drupalcommerce.org/commerce2/developer-guide/… to update Commerce to 2.9. That will then work with commerceguys/intl v1.0 – Bojan Zivanovic Sep 8 '18 at 14:04
  • Thanks again, back on line and everything working up to date! – 8en Sep 9 '18 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.