Skip to content

Commit 753cfee

Browse files
Update to test 8.5 compatibility (#66)
* Update to support php 8.5
1 parent e476722 commit 753cfee

5 files changed

Lines changed: 8 additions & 10 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
version: ['7.1', '7.4', '8.0', '8.4']
13+
version: ['7.1', '7.4', '8.0', '8.5']
1414
max-parallel: 2
1515

1616
steps:
@@ -41,7 +41,7 @@ jobs:
4141
runs-on: ubuntu-latest
4242
strategy:
4343
matrix:
44-
version: ['7.1', '7.4', '8.0', '8.4']
44+
version: ['7.1', '7.4', '8.0', '8.5']
4545
max-parallel: 1
4646

4747
steps:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A software development kit to provide ways to interact with CM.com's Text servic
99

1010
### Requirements
1111

12-
- php 7.1 through 8.4 (inclusive)
12+
- php 7.1 through 8.5 (inclusive)
1313

1414

1515
## Usage

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "cmdotcom/text-sdk-php",
33
"description": "PHP SDK to send messages with CM.com",
44
"type": "library",
5-
"version": "3.0.1",
5+
"version": "3.0.2",
66
"keywords": ["sms","cm.com","rcs","whatsapp","viber","line","wechat","imessage","twitter","instagram"],
77
"homepage": "https://www.cm.com/products/text/",
88
"license": "MIT",

src/CMText/RichContent/Messages/TextMessage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class TextMessage implements IRichMessage
2727
/**
2828
* TextMessage constructor.
2929
* @param string $Text
30-
* @param string $Tag
30+
* @param string|null $Tag
3131
*/
32-
public function __construct(string $Text, string $Tag = null)
32+
public function __construct(string $Text, ?string $Tag = null)
3333
{
3434
$this->text = $Text;
3535
$this->tag = $Tag;

src/CMText/TextClient.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class TextClient implements ITextClient
3232
/**
3333
* SDK Version constant
3434
*/
35-
const VERSION = '3.0.1';
35+
const VERSION = '3.0.2';
3636

3737

3838
/**
@@ -111,6 +111,7 @@ public function send(
111111
],
112112
CURLOPT_TIMEOUT => 20,
113113
CURLOPT_CONNECTTIMEOUT => 5,
114+
CURLOPT_FORBID_REUSE => true,
114115
]);
115116

116117
$response = curl_exec($ch);
@@ -124,9 +125,6 @@ public function send(
124125
}catch (\Exception $exception){
125126
$response = json_encode(['details' => $exception->getMessage()]);
126127
$statuscode = TextClientStatusCodes::UNKNOWN;
127-
128-
}finally{
129-
curl_close($ch);
130128
}
131129

132130
$return = new TextClientResult($statuscode, $response);

0 commit comments

Comments
 (0)