Breaking Changes
-
The
ex_cldr,ex_cldr_numbers, andex_cldr_unitsdependencies have been replaced bylocalize. -
The CLDR backend system has been removed entirely. There is no longer a need to define a backend module (e.g.
MyApp.Cldr) or configureuse Cldr, providers: [Money]. TheMoney.Backendmodule has been deleted. -
The
:backendoption has been removed from all public functions includingMoney.new/3,Money.to_string/2,Money.parse/2, andMoney.localize/2. Locale resolution now usesLocalize.get_locale/0by default. -
The
Money.default_backend!/0andMoney.default_backend/0functions have been removed. -
The
Money.cldr_backend_provider/1callback has been removed. -
The configuration keys
default_cldr_backend(in:ex_money) anddefault_backend(in:ex_cldr) are no longer used. -
Error messages from currency validation have changed. For example,
"The currency :ZZZ is unknown"is now"The currency :ZZZ is not known."(the message comes fromLocalize.UnknownCurrencyError). -
gringottssupport is removed. -
Currency lists returned by
Money.Currency.known_current_currencies/0,Money.Currency.known_historic_currencies/0, andMoney.Currency.known_tender_currencies/0have been updated to reflect newer CLDR data. Some currencies have moved between current and historic status.
Enhancements
-
All CLDR functionality is now provided by the single
localizepackage, simplifying the dependency tree and removing the need for compile-time backend configuration. -
Custom currencies are now managed in
ex_moneyrather thanlocalize. SeeMoney.Currency.new. -
Locale management is now handled at runtime via
Localize.get_locale/0andLocalize.put_locale/1, consistent with howGettextmanages locales. -
digital_tokenis now an explicit optional dependency rather than a transitive dependency throughex_cldr. -
The
Money.Subscription.Plan.to_string/2function now usesLocalize.Unitfor compound currency-per-unit formatting.