Skip to content

Commit

Permalink
change(internal): 替换为 yansongda/artful API 请求框架 (#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
yansongda authored Jan 11, 2024
1 parent 1aafd14 commit 4a1788a
Show file tree
Hide file tree
Showing 707 changed files with 2,303 additions and 4,861 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: composer require illuminate/container:^8.0
- name: Hyperf Framework
if: matrix.framework == 'hyperf'
run: composer require hyperf/utils hyperf/pimple
run: composer require hyperf/context hyperf/pimple
- name: Other/No Framework
if: matrix.framework == 'default'
run: composer require hyperf/pimple
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@
- change: cancel/close 的 API 参数只支持 array,不再支持 string(#900, #901)
- change: 微信合单支付去掉独立的 `combine_app_id`,`combine_mch_id` 配置,复用其它配置(#909)
- change: 手机网站支付快捷方式由 wap 改为 h5(#911, #915, #916)
- change: `Pay` 类对外方法由所改变,如果您有自行扩展相关插件,请检查(#926)
- change(internal): 按场景对 支付宝/微信/银联 插件进行分类 && 插件代码优化(#894, #909, #913, #922)
- change(internal): 将 支付/微信/银联 shortcut 从 plugin 文件夹独立出来(#895, #904, #905)
- change(internal): shortcut 完整标明各个插件,不使用 commonPlugin(#886)
- change(internal): DirectionInterface 方法由 `parse` 改为 `guide`(#896)
- change(internal): 错误代码 const 命名规则统一(#902, #903, #906, #909)
- change(internal): 错误代码 const 命名规则统一(#902, #903, #906, #909, #926)
- change(internal): 调整 `ProviderInterface` 的返回参数,增加了 `Rocket` 返回(#909)
- change(internal): 将 `call()` 方法重命名为 `shortcut()`(#914)
- change(internal): `mergeCommonPlugins` 不再作为 `AbstractProvider` 的方法(#918)
- change(internal): `AbstractProvider` 默认使用 `HttpClientFactoryInterface` 创建 http client(#921)
- change(internal): 调整 银联 插件文件夹结构(#923)
- change(internal): 替换为 `artful` API 请求框架(#926)

## v3.5.3

Expand Down
17 changes: 4 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,8 @@
"ext-libxml": "*",
"ext-json": "*",
"ext-bcmath": "*",
"psr/event-dispatcher": "^1.0",
"psr/log": "^1.1 || ^2.0 || ^3.0",
"psr/container": "^1.1 || ^2.0",
"psr/http-client": "^1.0",
"psr/http-message": "^1.1 || ^2.0",
"yansongda/supports": "~4.0.9",
"guzzlehttp/guzzle": "^7.0"
"yansongda/artful": "~1.0.7",
"yansongda/supports": "~4.0.9"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
Expand All @@ -40,7 +35,8 @@
"symfony/http-foundation": "^5.2.0",
"symfony/event-dispatcher": "^5.2.0",
"symfony/psr-http-message-bridge": "^2.1",
"hyperf/pimple": "^2.2"
"hyperf/pimple": "^2.2",
"guzzlehttp/guzzle": "^7.0"
},
"conflict": {
"hyperf/framework": "<3.0"
Expand All @@ -58,11 +54,6 @@
"Yansongda\\Pay\\Tests\\": "tests"
}
},
"suggest": {
"illuminate/container": "Laravel 框架下使用 SDK,请安装",
"hyperf/utils": "Hyperf 框架下使用 SDK,请安装",
"hyperf/pimple": "其它/无框架下使用 SDK,请安装"
},
"scripts": {
"test": "./vendor/bin/phpunit -c phpunit.xml --colors=always",
"cs-fix": "php-cs-fixer fix --dry-run --diff 1>&2",
Expand Down
14 changes: 0 additions & 14 deletions src/Contract/ConfigInterface.php

This file was deleted.

12 changes: 0 additions & 12 deletions src/Contract/ContainerInterface.php

This file was deleted.

12 changes: 0 additions & 12 deletions src/Contract/DirectionInterface.php

This file was deleted.

7 changes: 0 additions & 7 deletions src/Contract/EventDispatcherInterface.php

This file was deleted.

12 changes: 0 additions & 12 deletions src/Contract/HttpClientFactoryInterface.php

This file was deleted.

9 changes: 0 additions & 9 deletions src/Contract/HttpClientInterface.php

This file was deleted.

7 changes: 0 additions & 7 deletions src/Contract/LoggerInterface.php

This file was deleted.

14 changes: 0 additions & 14 deletions src/Contract/PackerInterface.php

This file was deleted.

13 changes: 0 additions & 13 deletions src/Contract/PluginInterface.php

This file was deleted.

10 changes: 1 addition & 9 deletions src/Contract/ProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,11 @@
use Psr\Http\Message\MessageInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Yansongda\Pay\Exception\ContainerException;
use Yansongda\Pay\Exception\InvalidParamsException;
use Yansongda\Pay\Exception\ServiceNotFoundException;
use Yansongda\Pay\Rocket;
use Yansongda\Artful\Rocket;
use Yansongda\Supports\Collection;

interface ProviderInterface
{
/**
* @throws ContainerException
* @throws InvalidParamsException
* @throws ServiceNotFoundException
*/
public function pay(array $plugins, array $params): null|Collection|MessageInterface|Rocket;

public function query(array $order): Collection|Rocket;
Expand Down
15 changes: 0 additions & 15 deletions src/Contract/ServiceProviderInterface.php

This file was deleted.

13 changes: 0 additions & 13 deletions src/Contract/ShortcutInterface.php

This file was deleted.

33 changes: 0 additions & 33 deletions src/Direction/CollectionDirection.php

This file was deleted.

17 changes: 0 additions & 17 deletions src/Direction/NoHttpRequestDirection.php

This file was deleted.

26 changes: 0 additions & 26 deletions src/Direction/OriginResponseDirection.php

This file was deleted.

7 changes: 0 additions & 7 deletions src/Direction/ResponseDirection.php

This file was deleted.

38 changes: 0 additions & 38 deletions src/Event.php

This file was deleted.

7 changes: 0 additions & 7 deletions src/Event/ApiRequested.php

This file was deleted.

3 changes: 2 additions & 1 deletion src/Event/CallbackReceived.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
namespace Yansongda\Pay\Event;

use Psr\Http\Message\ServerRequestInterface;
use Yansongda\Pay\Rocket;
use Yansongda\Artful\Event\Event;
use Yansongda\Artful\Rocket;

class CallbackReceived extends Event
{
Expand Down
17 changes: 0 additions & 17 deletions src/Event/Event.php

This file was deleted.

3 changes: 2 additions & 1 deletion src/Event/MethodCalled.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

namespace Yansongda\Pay\Event;

use Yansongda\Pay\Rocket;
use Yansongda\Artful\Event\Event;
use Yansongda\Artful\Rocket;

class MethodCalled extends Event
{
Expand Down
Loading

0 comments on commit 4a1788a

Please sign in to comment.