thephpleague / omnipay-common

Core components for the Omnipay PHP payment processing library
MIT License
329 stars 242 forks source link

Use of string currencies is deprecated #177

Closed funkjedi closed 6 years ago

funkjedi commented 6 years ago

Use of string currencies is deprecated and triggers an E_DEPRECATED error. https://github.com/moneyphp/money/commit/0e33bf8d26796bf3d60d595172aaef6deae80ecc

src/Parser/DecimalMoneyParser.php#L49

/*
 * This conversion is only required whilst currency can be either a string or a
 * Currency object.
 */
$currency = $forceCurrency;
if (!$currency instanceof Currency) {
    @trigger_error('Passing a currency as string is deprecated since 3.1 and will be removed in 4.0. Please pass a '.Currency::class.' instance instead.', E_USER_DEPRECATED);
    $currency = new Currency($currency);
}
barryvdh commented 6 years ago

Thanks!