Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle currencies customization #29

Closed
ludofleury opened this issue Aug 15, 2013 · 2 comments
Closed

Handle currencies customization #29

ludofleury opened this issue Aug 15, 2013 · 2 comments
Milestone

Comments

@ludofleury
Copy link

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

  • 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 ?
@sagikazarmark
Copy link
Collaborator

#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)

@sagikazarmark
Copy link
Collaborator

#58 Implements a decent logic for solving this issue. None of the mentioned solutions can be taken into action. IMO became invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants