Skip to content

Commit 442a35b

Browse files
committed
Release version 1.0.6
1 parent 1c35471 commit 442a35b

5 files changed

Lines changed: 18 additions & 11 deletions

File tree

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
strategy:
77
matrix:
88
operating-system: [ ubuntu-latest, windows-latest, macos-latest ]
9-
php-versions: [ '5.6', '7.0', '8.0' ]
9+
php-versions: [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ]
1010
runs-on: ${{ matrix.operating-system }}
1111
steps:
1212
- name: Checkout

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ Thư viện này chỉ nên đáp ứng những project nhỏ, làm việc với
1010

1111
Nếu cần nhiều tính năng hơn, hãy làm việc với Google Sheet API trên Google Cloud Platform - Tham khảo tài liệu tại đây: https://developers.google.com/sheets/api
1212

13+
## Version
14+
15+
Thư viện hỗ trợ 2 phiên bản song song, tùy thuộc vào phiên bản PHP của bạn sử dụng là gì để sử dụng cho thích hợp và tối ưu nhất
16+
17+
- [x] v1.x support all PHP version `>=5.4`
18+
- [x] v2.x support all PHP version `>=7.0`
19+
1320
## Cài đặt thư viện
1421

1522
Thư viện này được cài đặt thông qua Composer

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919
],
2020
"require": {
21-
"php": ">=5.6",
21+
"php": ">=5.4",
2222
"ext-curl": "*",
2323
"ext-json": "*"
2424
},

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Helper.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ class Helper
2626
const PORT_SSL = 443;
2727
const PORT_HTTP = 80;
2828

29-
const RESPONSE_SUCCESS = [
29+
protected static $RESPONSE_SUCCESS = array(
3030
'code' => self::EXIT_SUCCESS,
3131
'status' => 'success',
32-
'message' => 'Success',
33-
];
34-
const RESPONSE_FAILED = [
32+
'message' => 'Success'
33+
);
34+
protected static $RESPONSE_FAILED = array(
3535
'code' => self::EXIT_ERROR,
3636
'status' => 'failed',
3737
'message' => 'Error'
38-
];
38+
);
3939

4040
/**
4141
* Function sendToSpreadsheets
@@ -125,7 +125,7 @@ public static function backgroundHttpGet($url)
125125
log_message('error', "ERROR: " . json_encode($errno) . " - " . json_encode($errStr));
126126
}
127127

128-
return self::RESPONSE_FAILED;
128+
return self::$RESPONSE_FAILED;
129129
}
130130

131131
$out = "GET " . $parts['path'] . "?" . $parts['query'] . " HTTP/1.1\r\n";
@@ -135,6 +135,6 @@ public static function backgroundHttpGet($url)
135135
fwrite($fp, $out);
136136
fclose($fp);
137137

138-
return self::RESPONSE_SUCCESS;
138+
return self::$RESPONSE_SUCCESS;
139139
}
140140
}

0 commit comments

Comments
 (0)