概述
首先查看一下服务器的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
好的,到这里问题就解决了
最后
以上就是花痴微笑为你收集整理的更新个推服务端V2版本遇到的小问题的全部内容,希望文章能够帮你解决更新个推服务端V2版本遇到的小问题所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复