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

Pure json response from jsonSerialize #551

Merged
merged 3 commits into from
Mar 6, 2019
Merged

Conversation

zek
Copy link
Contributor

@zek zek commented Feb 19, 2019

Fixes #547

@frederikbosch
Copy link
Member

@zek Could you include a test for this? One that failed in the situation before your change, and now works with your change.

@zek
Copy link
Contributor Author

zek commented Feb 23, 2019

One that failed in the situation before your change, and now works with your change.

I am not familiar with testing. I don't know how can I test "before your change" part but I added second part.

This PR actually is not critical but before this PR jsonSerialize function returns currency object.

array(2) { ["amount"]=> string(3) "100" ["currency"]=> object(Money\Currency)#738 (1) { ["code":"Money\Currency":private]=> string(3) "EUR" } }

I believe we must return

array(2) { ["amount"]=> string(3) "300" ["currency"]=> string(3) "EUR" }

@frederikbosch
Copy link
Member

Thanks, look good to me. @sagikazarmark What do you think?

@frederikbosch frederikbosch merged commit d5da291 into moneyphp:master Mar 6, 2019
@frederikbosch
Copy link
Member

Thanks @zek!

@alle
Copy link

alle commented Mar 6, 2019

@zek @frederikbosch Thank you very much, guys! ☺️

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

Successfully merging this pull request may close these issues.

3 participants