wechatpay-apiv3 / wechatpay-php

微信支付 APIv3 的官方 PHP Library,同时也支持 APIv2
Apache License 2.0
496 stars 100 forks source link

php7.2.1无法使用? #10

Closed henggedaren closed 3 years ago

henggedaren commented 3 years ago

使用的是7.2.1的版本,composer报错如下:

Your requirements could not be resolved to an installable set of packages.

Problem 1

TheNorthMemory commented 3 years ago

guzzle7 最低支持的PHP版本是 7.2.5,所以你的 7.2.1 装不上。

TheNorthMemory commented 3 years ago

另外 PHP7.2 都已经EOL了,PHP官方也都停止维护了,建议你升级至PHP7.4版本

henggedaren commented 3 years ago

另外 PHP7.2 都已经EOL了,PHP官方也都停止维护了,建议你升级至PHP7.4版本

升级是没有问题的。但是个人觉得最低支持7.0版本比较通用吧,毕竟很多老的项目一时半会没法升级到这么高的版本。

TheNorthMemory commented 3 years ago

依赖的关键的加解密功能ext-openssl在PHP7.1上才支持aes-gcm;兼容php7.0会比较困难,要做许多适配,另外这个PHP7.2.5也是随guzzle7限制的,如果是低版本PHP可以尝试用wechatpay-guzzle-middleware

henggedaren commented 3 years ago

依赖的关键的加解密功能ext-openssl在PHP7.1上才支持aes-gcm;兼容php7.0会比较困难,要做许多适配,另外这个PHP7.2.5也是随guzzle7限制的,如果是低版本PHP可以尝试用wechatpay-guzzle-middleware

了解了,非常感谢解答!