更新个推服务端V2版本遇到的小问题

首先查看一下服务器的composer版本

composer -V
Composer version 1.10.22 2021-04-27 13:10:45

为了保证兼容性,暂时不能将composer 的版本升级至2.x

但是可以通过 yum 安装一下

 yum install composer

然后切换用户,并进入项目目录,拉取最新的代码,然后执行

composer install --ignore-platform-reqs

执行命令:composer install --ignore-platform-reqs
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 1 install, 0 updates, 0 removals
  - Installing getuilaboratory/getui-pushapi-php-client (dev-master ba1b525): Downloading (100%)         
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
Warning: Ambiguous class resolution, "GTConfig" was found 2x: in "/home/program/vendor/getuilaboratory/getui-pushapi-php-client/igetui/utils/GTConfig.php" and "/home/program/vendor/getuilaboratory/getui-pushapi-php-client-v2/utils/GTConfig.php", the first will be used.

此时需要删除v1版本,仅保留v2版本,就可以解决“"GTConfig" was found 2x”的错误

[www@server program]$ rm -rf vendor/getuilaboratory/getui-pushapi-php-client
[www@server program]$ cd vendor/getuilaboratory/
[www@server getuilaboratory]$ ll
total 4
drwxrwxr-x 6 www www 4096 Mar 21 16:32 getui-pushapi-php-client-v2
#再次回到项目根目录
[www@server getuilaboratory]$ cd ../../
[www@server program]$ composer dump-autoload
Generating optimized autoload files
Generated optimized autoload files containing 5707 classes

好的,到这里问题就解决了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值