jolicode / slack-php-api

:hash: PHP Slack Client based on the official OpenAPI specification
https://jolicode.github.io/slack-php-api/
MIT License
222 stars 56 forks source link

chatUpdate -> 'ts' requiring float that PHP can never satisfy #42

Closed runthis closed 4 years ago

runthis commented 5 years ago

PHP will never be able to satisfy this float 1562189704.014800

Sending Slack a string of "1562189704.014800" works perfectly fine.

PHP literally does not have the ability to maintain 1562189704.014800 as a float. It will always remove the trailing zeros unless its a string.

$optionsResolver->setAllowedTypes('text', ['float']);

should be

$optionsResolver->setAllowedTypes('text', ['string']);

If this already exists in a newer version please let me know. Thanks for an awesome tool by the way!

GreenSuslik commented 5 years ago

Yep! Php create from string = "1567091229.010100" float = 1567091229.0101

GreenSuslik commented 5 years ago

It's fix in https://github.com/jolicode/slack-php-api/pull/45

damienalexandre commented 4 years ago

45 has been released! Could you report if this issue can be closed?

Thanks!

GreenSuslik commented 4 years ago

I have checked, all ok.

damienalexandre commented 4 years ago

Awesome, thanks!!