diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 95d40a3..33862bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: ['7.1', '7.4', '8.0', '8.4'] + version: ['7.1', '7.4', '8.0', '8.5'] max-parallel: 2 steps: @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: ['7.1', '7.4', '8.0', '8.4'] + version: ['7.1', '7.4', '8.0', '8.5'] max-parallel: 1 steps: diff --git a/README.md b/README.md index 06f9439..ca6cb40 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A software development kit to provide ways to interact with CM.com's Text servic ### Requirements -- php 7.1 through 8.4 (inclusive) +- php 7.1 through 8.5 (inclusive) ## Usage diff --git a/composer.json b/composer.json index 33aeb8e..2caec4b 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "cmdotcom/text-sdk-php", "description": "PHP SDK to send messages with CM.com", "type": "library", - "version": "3.0.1", + "version": "3.0.2", "keywords": ["sms","cm.com","rcs","whatsapp","viber","line","wechat","imessage","twitter","instagram"], "homepage": "https://www.cm.com/products/text/", "license": "MIT", diff --git a/src/CMText/RichContent/Messages/TextMessage.php b/src/CMText/RichContent/Messages/TextMessage.php index 6e9485b..ec175b6 100644 --- a/src/CMText/RichContent/Messages/TextMessage.php +++ b/src/CMText/RichContent/Messages/TextMessage.php @@ -27,9 +27,9 @@ class TextMessage implements IRichMessage /** * TextMessage constructor. * @param string $Text - * @param string $Tag + * @param string|null $Tag */ - public function __construct(string $Text, string $Tag = null) + public function __construct(string $Text, ?string $Tag = null) { $this->text = $Text; $this->tag = $Tag; diff --git a/src/CMText/TextClient.php b/src/CMText/TextClient.php index b98bd8f..51edd71 100644 --- a/src/CMText/TextClient.php +++ b/src/CMText/TextClient.php @@ -32,7 +32,7 @@ class TextClient implements ITextClient /** * SDK Version constant */ - const VERSION = '3.0.1'; + const VERSION = '3.0.2'; /** @@ -111,6 +111,7 @@ public function send( ], CURLOPT_TIMEOUT => 20, CURLOPT_CONNECTTIMEOUT => 5, + CURLOPT_FORBID_REUSE => true, ]); $response = curl_exec($ch); @@ -124,9 +125,6 @@ public function send( }catch (\Exception $exception){ $response = json_encode(['details' => $exception->getMessage()]); $statuscode = TextClientStatusCodes::UNKNOWN; - - }finally{ - curl_close($ch); } $return = new TextClientResult($statuscode, $response);