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

change: 所有的 Find*Plugin 调整为 Query*Plugin #756

Merged
merged 2 commits into from
Mar 19, 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

### changed

- change: 所有的 `Find*Plugin` 调整为 `Query*Plugin`(#756)
- change: 插件开始装载日志由 `info` 调整为 `debug`(#755)
- change: ParserInterface 签名由 `?ResponseInterface $response` 变更为 `PackerInterface $packer, ?ResponseInterface $response`(#754)
- change: ParserInterface 签名由 `?ResponseInterface $response` 调整为 `PackerInterface $packer, ?ResponseInterface $response`(#754)

## v3.2.14

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* @see https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_6_2.shtml
*/
class FindPlugin extends GeneralPlugin
class QueryPlugin extends GeneralPlugin
{
/**
* @throws \Yansongda\Pay\Exception\InvalidParamsException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* @see https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_6_5.shtml
*/
class FindReturnAdvancePlugin extends GeneralPlugin
class QueryReturnAdvancePlugin extends GeneralPlugin
{
/**
* @throws \Yansongda\Pay\Exception\InvalidParamsException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
/**
* @see https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_2_10.shtml
*/
class FindRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\FindRefundPlugin
class QueryRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryRefundPlugin
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
/**
* @see https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter5_1_15.shtml
*/
class FindRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\FindRefundPlugin
class QueryRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryRefundPlugin
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Yansongda\Pay\Plugin\Wechat\GeneralPlugin;
use Yansongda\Pay\Rocket;

class FindRefundPlugin extends GeneralPlugin
class QueryRefundPlugin extends GeneralPlugin
{
/**
* @throws \Yansongda\Pay\Exception\InvalidParamsException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
/**
* @see https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_3_10.shtml
*/
class FindRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\FindRefundPlugin
class QueryRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryRefundPlugin
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
/**
* @see https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_10.shtml
*/
class FindRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\FindRefundPlugin
class QueryRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryRefundPlugin
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
/**
* @see https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_5_10.shtml
*/
class FindRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\FindRefundPlugin
class QueryRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryRefundPlugin
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
/**
* @see https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_4_10.shtml
*/
class FindRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\FindRefundPlugin
class QueryRefundPlugin extends \Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryRefundPlugin
{
}
4 changes: 2 additions & 2 deletions src/Plugin/Wechat/Shortcut/QueryShortcut.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
use Yansongda\Pay\Contract\ShortcutInterface;
use Yansongda\Pay\Exception\Exception;
use Yansongda\Pay\Exception\InvalidParamsException;
use Yansongda\Pay\Plugin\Wechat\Pay\Common\FindRefundPlugin;
use Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryPlugin;
use Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryRefundPlugin;
use Yansongda\Supports\Str;

class QueryShortcut implements ShortcutInterface
Expand Down Expand Up @@ -41,7 +41,7 @@ protected function defaultPlugins(): array
protected function refundPlugins(): array
{
return [
FindRefundPlugin::class,
QueryRefundPlugin::class,
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
use Yansongda\Pay\Exception\Exception;
use Yansongda\Pay\Exception\InvalidParamsException;
use Yansongda\Pay\Pay;
use Yansongda\Pay\Plugin\Wechat\Ecommerce\Refund\FindPlugin;
use Yansongda\Pay\Plugin\Wechat\Ecommerce\Refund\QueryPlugin;
use Yansongda\Pay\Provider\Wechat;
use Yansongda\Pay\Rocket;
use Yansongda\Pay\Tests\TestCase;
use Yansongda\Supports\Collection;

class FindPluginTest extends TestCase
class QueryPluginTest extends TestCase
{
/**
* @var \Yansongda\Pay\Plugin\Wechat\Ecommerce\Refund\FindPlugin
* @var \Yansongda\Pay\Plugin\Wechat\Ecommerce\Refund\QueryPlugin
*/
protected $plugin;

protected function setUp(): void
{
parent::setUp();

$this->plugin = new FindPlugin();
$this->plugin = new QueryPlugin();
}

public function testNotInServiceMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
use Yansongda\Pay\Exception\Exception;
use Yansongda\Pay\Exception\InvalidParamsException;
use Yansongda\Pay\Pay;
use Yansongda\Pay\Plugin\Wechat\Ecommerce\Refund\FindReturnAdvancePlugin;
use Yansongda\Pay\Plugin\Wechat\Ecommerce\Refund\QueryReturnAdvancePlugin;
use Yansongda\Pay\Provider\Wechat;
use Yansongda\Pay\Rocket;
use Yansongda\Pay\Tests\TestCase;
use Yansongda\Supports\Collection;

class FindReturnAdvancePluginTest extends TestCase
class QueryReturnAdvancePluginTest extends TestCase
{
/**
* @var \Yansongda\Pay\Plugin\Wechat\Ecommerce\Refund\FindReturnAdvancePlugin
* @var \Yansongda\Pay\Plugin\Wechat\Ecommerce\Refund\QueryReturnAdvancePlugin
*/
protected $plugin;

protected function setUp(): void
{
parent::setUp();

$this->plugin = new FindReturnAdvancePlugin();
$this->plugin = new QueryReturnAdvancePlugin();
}

public function testNotInServiceMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
use GuzzleHttp\Psr7\Uri;
use Psr\Http\Message\RequestInterface;
use Yansongda\Pay\Pay;
use Yansongda\Pay\Plugin\Wechat\Pay\Common\FindRefundPlugin;
use Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryRefundPlugin;
use Yansongda\Pay\Provider\Wechat;
use Yansongda\Pay\Rocket;
use Yansongda\Pay\Tests\TestCase;
use Yansongda\Supports\Collection;

class FindRefundPluginTest extends TestCase
class QueryRefundPluginTest extends TestCase
{
/**
* @var \Yansongda\Pay\Plugin\Wechat\Pay\Common\FindRefundPlugin
* @var \Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryRefundPlugin
*/
protected $plugin;

protected function setUp(): void
{
parent::setUp();

$this->plugin = new FindRefundPlugin();
$this->plugin = new QueryRefundPlugin();
}

public function testNormal()
Expand Down
4 changes: 2 additions & 2 deletions tests/Plugin/Wechat/Shortcut/QueryShortcutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Yansongda\Pay\Exception\Exception;
use Yansongda\Pay\Exception\InvalidParamsException;
use Yansongda\Pay\Plugin\Wechat\Pay\Common\FindRefundPlugin;
use Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryRefundPlugin;
use Yansongda\Pay\Plugin\Wechat\Pay\Common\QueryPlugin;
use Yansongda\Pay\Plugin\Wechat\Shortcut\QueryShortcut;
use Yansongda\Pay\Tests\TestCase;
Expand All @@ -32,7 +32,7 @@ public function testDefault()
public function testRefund()
{
self::assertEquals([
FindRefundPlugin::class,
QueryRefundPlugin::class,
], $this->plugin->getPlugins(['_type' => 'refund']));
}

Expand Down