ably / ably-php

PHP client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
51 stars 10 forks source link

TokenRequest: timestamp is integer in PHPDoc, string at runtime, Flutter expects int #99

Closed alexeyinkin closed 3 years ago

alexeyinkin commented 3 years ago

In TokenRequest class, $timestamp field is marked as integer in PHPDoc but is set a string in https://github.com/ably/ably-php/blob/7271326c18148b72f4ae4805df60976de81663c1/src/Auth.php#L309 and in a few locations below that.

When I serialize the whole thing and send it to my client app in Flutter, it breaks trying to cast it to int here: https://github.com/ably/ably-flutter/blob/e6a55d0e6691c32e049486a9abee8d0f766dbddd/lib/src/spec/common.dart#L361

Either you should make one type in both places, or in Flutter there must be parsing instead of casting.

┆Issue is synchronized with this Jira Uncategorised by Unito

QuintinWillison commented 3 years ago

Thanks for the report, @alexeyinkin ... we'll take a look and get back to you here.

alexeyinkin commented 2 years ago

This is still not in stable as the latest release is 1.1.4 on March 10. Any plans on release?

QuintinWillison commented 2 years ago

Hello @alexeyinkin - sorry about that, I see we have a bit of overlooked work that's yet to be released for this SDK. I'm going to get that sorted, hopefully in the next few days. Thanks for your patience.