wechatpay-apiv3 / wechatpay-guzzle-middleware

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

可否将 GuzzleHttp 的依赖提升至 ^7.0 #54

Closed feng-yifan closed 3 years ago

feng-yifan commented 3 years ago

最新的 Laravel 8 对 GuzzleHttp 的依赖已经高过这个包的依赖了

image

Laravel 8 会给出如下错误

Call to undefined function GuzzleHttp\Psr7\hash() {"exception":"[object] (Error(code: 0): Call to undefined function GuzzleHttp\\Psr7\\hash() at /app/vendor/wechatpay/wechatpay-guzzle-middleware/src/Util/MediaUtil.php:91)
feng-yifan commented 3 years ago

@tpirc3

feng-yifan commented 3 years ago

目前手动将 Laravel 8 的 guzzlehttp/guzzle 依赖版本降级至 ^6.3 作为临时方案了

xy-peng commented 3 years ago

直接迁移到 wechatpay-php 呢?

TheNorthMemory commented 3 years ago

Guzzle7上,废弃了 \GuzzleHttp\json_encode\GuzzleHttp\Psr7\hash 方法,分别被移动至 \GuzzleHttp\Utils::jsonEncodeGuzzleHttp\Psr7\Utils::hash 上,Laravel 8+ 建议直接用 wechatpay-php 包,测试用例覆盖环境从PHP7.2~8.0都有github actions覆盖,可以顺畅使用。

feng-yifan commented 3 years ago

直接迁移到 wechatpay-php 呢?

好的, 之前没有留意到有这个包

feng-yifan commented 3 years ago

Guzzle7上,废弃了 \GuzzleHttp\json_encode\GuzzleHttp\Psr7\hash 方法,分别被移动至 \GuzzleHttp\Utils::jsonEncodeGuzzleHttp\Psr7\Utils::hash 上,Laravel 8+ 建议直接用 wechatpay-php 包,测试用例覆盖环境从PHP7.2~8.0都有github actions覆盖,可以顺畅使用。

多谢!