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

The "ts" field could be seen as an integer, we must allow string and number #34

Closed damienalexandre closed 5 years ago

damienalexandre commented 5 years ago

I got this error while testing #23:

TypeError: Argument 1 passed to JoliCode\Slack\Api\Model\ObjsMessageAttachmentsItem::setTs() must be of the type string or null, integer given, called in /home/dalexandre/Dev/slack-php-api/generated/Normalizer/ObjsMessageAttachmentsItemNormalizer.php on line 108

That's hard to reproduce but sometime the Slack API will return a valid integer, so we can't rely on PHP strict type for those "ts" fields.

This PR fix this and also fix the patch format. cc @pyrech