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

New features are all in APIv3, there's no reason to continue use this kind client since v2.0. #38

Closed
suiaiyun opened this issue Sep 7, 2021 · 2 comments

Comments

@suiaiyun
Copy link

suiaiyun commented Sep 7, 2021

这条该死的提示为什么一直关不掉?display_errors = Off 也不行?

@TheNorthMemory
Copy link
Collaborator

$endpoint = $instance->chain('v2/mmpaymkttransfers/promotion/transfers');
// samples howto control the `HandlerStack`, only effect this request
$stack = clone $endpoint->getDriver()->select(ClientDecoratorInterface::XML_BASED)->getConfig('handler');
/** @var HandlerStack $stack */
$stack->remove('transform_response');
// yes, start with `@` to prevent the internal `E_USER_DEPRECATED`
@$endpoint->postAsync(['xml' => [ 'mchid' => $mchid, ], 'handler' => $stack])->then(static function(ResponseInterface $res) {

参考上述测试用例覆盖,用 @$endpoint->postAsync 可屏蔽掉提示。。。

@suiaiyun
Copy link
Author

suiaiyun commented Sep 7, 2021

谢谢,按照您的方法已解决,nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants