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
Actually, I want to add a new currency, for example: facebook credit.
I have many options:
1 Do not rely directly on Money.
* Custom\Currency extends Custom\Currency override the __construct.
* Custom\Money extend Money\Money override the __construct and the __callStatic replace the Currency typehinting by a Custom\Currency
2 Rely on Money
Use the Currency and add my custom currency data into the currencies file
In the first case, it looks a bit overkill but maybe it's the best practice (I would love a feedback)?
In the second case, it's straightforward yet it requires a hack in currencies.php file which is not versioned but live in the vendor dependency directory (and that sucks).
Can we rely on a global var / path ? some other stuffs ?
The text was updated successfully, but these errors were encountered:
#58 implements some sort of repository for currencies. You will be able to use custom currencies, but it will be your responsibility to check whether a currency is "real" or not. (By the definition of value object validation will be no more part of the Currency implementation)
Hey,
Actually, I want to add a new currency, for example: facebook credit.
I have many options:
1 Do not rely directly on Money.
* Custom\Currency extends Custom\Currency override the __construct.
* Custom\Money extend Money\Money override the __construct and the __callStatic replace the Currency typehinting by a Custom\Currency
2 Rely on Money
Can we rely on a global var / path ? some other stuffs ?
The text was updated successfully, but these errors were encountered: