You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ec26e88
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,16 @@
8
8
-`ExchangeRateProviderException`
9
9
-`MoneyFormatException`
10
10
-`MoneyNumberFormatter` has been removed; call `NumberFormatter::formatCurrency()` directly instead
11
+
-`Money::formatToLocale()` and `MoneyLocaleFormatter` now format through ICU's modern number skeleton pipeline, and minor formatting differences may appear in some locales
12
+
-`Money::formatToLocale()` and `MoneyLocaleFormatter` now require the intl extension to be linked against **ICU 62.1 or later**, and throw a `MoneyFormatException` on older ICU (this is independent of the PHP version)
13
+
-`Money::formatToLocale()` and `MoneyLocaleFormatter` now accept a `CurrencyDisplay` parameter in the second position
11
14
-`Money::formatToLocale()` and `MoneyLocaleFormatter` now throw a `MoneyFormatException` if the amount cannot be accurately represented as a float, rather than formatting it with wrong digits
12
15
16
+
✨ **New features**
17
+
18
+
-`Money::formatToLocale()` and `MoneyLocaleFormatter` now accept a `CurrencyDisplay` parameter controlling how the currency is displayed: `Symbol` (default), `NarrowSymbol`, `Code`, `Name`, or `None` (amount only)
19
+
-`MoneyLocaleFormatter` now properly displays custom currencies whose code is not three letters (e.g. `USDT`, `GOLD`)
> Formatting is performed using intl's `NumberFormatter`, which represents values using floats. If the amount cannot be accurately represented as a float, a `MoneyFormatException` is thrown rather than formatting it with wrong digits.
661
+
The optional `$currencyDisplay` parameter controls how the currency is rendered:
0 commit comments