Learnosity / learnosity-sdk-php

Learnosity SDK for PHP
Apache License 2.0
10 stars 10 forks source link

[FEATURE] Allow request to be passed as a string #25

Closed karoltarasiuk closed 6 years ago

karoltarasiuk commented 6 years ago

This solves the issue when float numbers are getting coverted to scientific notation when encoded into JSON. For different languages this may happen after different number of decimal places which creates discrepencies and causes security packet mismatch.

In PHP numbers up to 4 decimal places stay untouched and 0.00001 gets converted to 1.0e-5.

Meanwhile in JS numbers up to 6 decimal places stay untouched and then 0.0000001 gets converted to 1e-7.

LRN-17712

karoltarasiuk commented 6 years ago

@shtrom should I add a v0.9.0 release for this change? It's a feature so need to bump the minor. I think it's worth doing - it's been a while since the last tag...

https://github.com/Learnosity/learnosity-sdk-php/releases

shtrom commented 6 years ago

Yes and no. We definitely need it as a feature. However, the recent releases introduced a hard dependency on composer that we want to reverse. It may not be worth waiting for that fix, though.

On 5 February 2018 at 14:32, Karol Tarasiuk notifications@github.com wrote:

@shtrom https://github.com/shtrom should I add a v0.9.0 release for this change? It's a feature so need to bump the minor. I think it's worth doing - it's been a while since the last tag...

https://github.com/Learnosity/learnosity-sdk-php/releases

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Learnosity/learnosity-sdk-php/pull/25#issuecomment-362972799, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJyGM5JUKMBMsCXj2BVT6OOX0P8YTYoks5tRnY-gaJpZM4RRN8u .

karoltarasiuk commented 6 years ago

Haha, I know no more than before asking this question :D again would be easier if there is a team owning this repo... but feel that I should tag it. Reverts can be on a patch.

shtrom commented 6 years ago

Ok. Tag it is (:

That said, I'm not sure if it actually suffices to make a release. We definitely need to clear that up.

On 5 February 2018 at 16:10, Karol Tarasiuk notifications@github.com wrote:

Haha, I know no more than before asking this question :D again would be easier if there is a team owning this repo... but feel that I should tag it. Reverts can be on a patch.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Learnosity/learnosity-sdk-php/pull/25#issuecomment-362983252, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJyGEV4SpOsG7JAwS68UfuVwPFhrW3lks5tRo1KgaJpZM4RRN8u .