Commit 44c7426d authored by Tim Plunkett's avatar Tim Plunkett Committed by Sascha Grossenbacher
Browse files

Issue #3223997 by tim.plunkett: Allow PHP 8, Drupal 10 compatibility

parent 1f2d8c1e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
  },
  "require" : {
    "ext-bcmath": "*",
    "php": "~7.1",
    "drupal/plugin": "^2.6",
    "commercie/currency": "~1.0",
    "commercie/currency-exchange": "~1.0"
+1 −1
Original line number Diff line number Diff line
name: Currency
description: Provides currency metadata and exchange rates, and amount formatting.
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9.1 || ^10
configure: entity.currency.collection
type: module
dependencies:
+1 −1
Original line number Diff line number Diff line
name: Currency Intl
description: Formats amounts according the locales of users using the PHP Intl extension.
core_version_requirement: ^8.7.7 || ^9
core_version_requirement: ^9.1 || ^10
type: module
dependencies:
  - currency:currency
+5 −5
Original line number Diff line number Diff line
@@ -27,14 +27,14 @@ class IntlTest extends UnitTestCase {
  /**
   * The locale resolver.
   *
   * @var \Drupal\currency\LocaleResolverInterface|\PHPUnit_Framework_MockObject_MockObject
   * @var \Drupal\currency\LocaleResolverInterface|\PHPUnit\Framework\MockObject\MockObject
   */
  protected $localeResolver;

  /**
   * {@inheritdoc}
   */
  public function setUp() {
  public function setUp(): void {
    $configuration = array();
    $plugin_id = $this->randomMachineName();
    $plugin_definition = array();
@@ -107,13 +107,13 @@ class IntlTest extends UnitTestCase {
    $results = array(
      // An amount with no decimals should be formatted without decimals and
      // decimal separator.
      '123' => '₴-123UAH',
      '123' => '₴-123 UAH',
      // An amount with three groupings should have two grouping separators. All
      // of its three decimals should be formatted, even if the currency only
      // has two.
      '1234567.890' => '₴-1%234%567@890UAH',
      '1234567.890' => '₴-1%234%567@890 UAH',
      // An amount with only one decimal should be formatted with only one.
      '.3' => '₴-0@3UAH',
      '.3' => '₴-0@3 UAH',
    );
    foreach ($results as $amount=> $expected) {
      $formatted = $this->formatter->formatAmount($currency, $amount);
+1 −1
Original line number Diff line number Diff line
name: Currency Tests
description: "Supports Currency's automated tests."
core_version_requirement: ^8.7.7 || ^9
package: Testing
dependencies:
  - currency:currency
hidden: TRUE
Loading