Skip to content

[BREAKING CHANGES] New Money Formatter + 7.4 Support

Pre-release
Pre-release
Compare
Choose a tag to compare
@lukepolo lukepolo released this 01 May 15:33
· 25 commits to master since this release
450b5fa

This should solve PHP7.4 depreciating of money_fomrat. Also it should solve windows not being able to use LaraCart at all.

BREAKING CHANGES

International Formatting

International formatting has been replaced with currency code in the config.

    /*
    |--------------------------------------------------------------------------
    | The currency code changes how you see the actual amounts.
    |--------------------------------------------------------------------------
    | This is the list of all valid currency codes
    | https://www2.1010data.com/documentationcenter/prod/1010dataReferenceManual/DataTypesAndFormats/currencyUnitCodes.html
    |
    */
    'currency_code' => 'USD',

The Format Money Function

formatMoney signature has changed

public static function formatMoney($number, $locale = null, $internationalFormat = false, $format = true)
public static function formatMoney($number, $locale = null, $currencyCode = null, $format = true)

So please look through your code and replace anytime that you are using the $internationalFormat.