wechatpay-apiv3 / wechatpay-guzzle-middleware

微信支付 APIv3 Guzzle HTTP Client中间件(middleware)
Apache License 2.0
208 stars 46 forks source link

Call to undefined function GuzzleHttp\\Psr7\\hash() #55

Closed diankemao closed 3 years ago

diankemao commented 3 years ago

文件 WechatPay\GuzzleMiddleware\Util\MediaUtil.php \GuzzleHttp\Psr7\hash() 找不到这个方法了,已废弃,修改成\GuzzleHttp\Psr7\Utils::hash()就ok了,请修复?

    $json = \GuzzleHttp\json_encode([
        'filename' => $basename,
        'sha256'   => \GuzzleHttp\Psr7\Utils::hash($stream, 'sha256'),
    ]);
    $this->meta = $json;
diankemao commented 3 years ago

把GuzzleHttp\Psr7\hash修改为\GuzzleHttp\Psr7\Utils::hash

xy-peng commented 3 years ago

新版本 guzzle 建议使用wechatpay-php