Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP8.3 support #128

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php-version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -86,8 +86,8 @@ jobs:
id: phpstan-php-7_2-8_1

- run: vendor/bin/phpstan analyse --no-progress --memory-limit=-1 -c phpstan.v8.2.neon
if: matrix.php-version == '8.2'
id: phpstan-php-8_2
if: 8.1 < matrix.php-version && matrix.php-version < '8.4'
id: phpstan-php-8_2-8_3

- run: |
make keygen
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# 变更历史

## [1.4.8](../../compare/v1.4.7...v1.4.8) - 2023-01-01
## [1.4.9](../../compare/v1.4.8...v1.4.9) - 2023-11-21

- 支持PHP8.3运行时

## [1.4.8](../../compare/v1.4.7...v1.4.8) - 2023-01-05

- 新增海外账单下载`/v3/global/statements`应答特殊处理逻辑;

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

## 项目状态

当前版本为 `1.4.8` 测试版本。
当前版本为 `1.4.9` 测试版本。
项目版本遵循 [语义化版本号](https://semver.org/lang/zh-CN/)。
如果你使用的版本 `<=v1.3.2`,升级前请参考 [升级指南](UPGRADING.md)。

Expand Down
2 changes: 0 additions & 2 deletions bin/CertificateDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function run(): void
private static function certsInjector(string $apiv3Key, array &$certs): callable {
return static function(ResponseInterface $response) use ($apiv3Key, &$certs): ResponseInterface {
$body = (string) $response->getBody();
/** @var object{data:array<object{encrypt_certificate:object{serial_no:string,nonce:string,associated_data:string}}>} $json */
$json = \json_decode($body);
$data = \is_object($json) && isset($json->data) && \is_array($json->data) ? $json->data : [];
\array_map(static function($row) use ($apiv3Key, &$certs) {
Expand Down Expand Up @@ -119,7 +118,6 @@ private function job(array $opts): void
private static function certsRecorder(string $outputDir, array &$certs): callable {
return static function(ResponseInterface $response) use ($outputDir, &$certs): ResponseInterface {
$body = (string) $response->getBody();
/** @var object{data:array<object{effective_time:string,expire_time:string:serial_no:string}>} $json */
$json = \json_decode($body);
$data = \is_object($json) && isset($json->data) && \is_array($json->data) ? $json->data : [];
\array_walk($data, static function($row, $index, $certs) use ($outputDir) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wechatpay/wechatpay",
"version": "1.4.8",
"version": "1.4.9",
"description": "[A]Sync Chainable WeChatPay v2&v3's OpenAPI SDK for PHP",
"type": "library",
"keywords": [
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
Expand Down
2 changes: 1 addition & 1 deletion src/ClientDecoratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface ClientDecoratorInterface
/**
* @var string - This library version
*/
public const VERSION = '1.4.8';
public const VERSION = '1.4.9';

/**
* @var string - The HTTP transfer `xml` based protocol
Expand Down
3 changes: 0 additions & 3 deletions tests/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class BuilderTest extends TestCase

public function testConstractor(): void
{
if (method_exists($this, 'expectError')) {
$this->expectError();
}
// for PHPUnit8+
if (method_exists($this, 'expectExceptionMessageMatches')) {
$this->expectExceptionMessageMatches('#^Call to private#');
Expand Down