您当前的位置: 首页 > 慢生活 > 程序人生 网站首页程序人生
composer update时忽略平台要求(忽略某些依赖对php版本的限制)
发布时间:2022-11-15 21:24:57编辑:雪饮阅读()
有时候会遇到这样的问题,比如这里我用php7.3更新下我的项目composer依赖,但是某些依赖是要求php版本要高于7.3,比如7.4
[root@k8s-master01 www.zhuanzhuan.com]# /www/server/php/73/bin/php -c /www/server/php/73/etc/php.ini /usr/bin/composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires topthink/think-swoole v4.0.0 -> satisfiable by topthink/think-swoole[v4.0.0].
- topthink/think-swoole v4.0.0 requires php >=7.4 -> your php version (7.3.31) does not satisfy that requirement.
Problem 2
- overtrue/socialite[3.5.0, ..., 3.5.3] require php >=7.4 -> your php version (7.3.31) does not satisfy that requirement.
- Root composer.json requires overtrue/socialite ~v3.5.0 -> satisfiable by overtrue/socialite[3.5.0, 3.5.1, 3.5.2, 3.5.3].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
那么这个项目其实我只是本地临时用一下啊,没有必要太较真,那么我们可以通过--ignore-platform-reqs参数忽略这种限制,则如:
[root@k8s-master01 www.zhuanzhuan.com]# /www/server/php/73/bin/php -c /www/server/php/73/etc/php.ini /usr/bin/composer update --ignore-platform-reqs
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 9 updates, 0 removals
- Upgrading league/flysystem (1.1.9 => 1.1.10)
- Upgrading qcloud/cos-sdk-v5 (v2.5.6 => v2.6.0)
- Upgrading symfony/deprecation-contracts (v2.5.2 => v3.1.1)
- Upgrading symfony/event-dispatcher (v5.4.9 => v6.1.0)
- Upgrading symfony/event-dispatcher-contracts (v2.5.2 => v3.1.0)
- Upgrading symfony/translation (v5.4.12 => v6.1.4)
- Upgrading symfony/translation-contracts (v2.5.2 => v3.1.1)
- Upgrading symfony/var-exporter (v5.4.10 => v6.1.3)
- Downgrading topthink/think-swoole (v4.0.7 => v4.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 9 updates, 0 removals
- Downloading league/flysystem (1.1.10)
- Downloading symfony/deprecation-contracts (v3.1.1)
- Downloading symfony/event-dispatcher-contracts (v3.1.0)
- Downloading symfony/event-dispatcher (v6.1.0)
- Downloading symfony/var-exporter (v6.1.3)
- Downloading qcloud/cos-sdk-v5 (v2.6.0)
- Downloading symfony/translation-contracts (v3.1.1)
- Downloading symfony/translation (v6.1.4)
- Downloading topthink/think-swoole (v4.0.0)
- Upgrading league/flysystem (1.1.9 => 1.1.10): Extracting archive
- Upgrading symfony/deprecation-contracts (v2.5.2 => v3.1.1): Extracting archive
- Upgrading symfony/event-dispatcher-contracts (v2.5.2 => v3.1.0): Extracting archive
- Upgrading symfony/event-dispatcher (v5.4.9 => v6.1.0): Extracting archive
- Upgrading symfony/var-exporter (v5.4.10 => v6.1.3): Extracting archive
- Upgrading qcloud/cos-sdk-v5 (v2.5.6 => v2.6.0): Extracting archive
- Upgrading symfony/translation-contracts (v2.5.2 => v3.1.1): Extracting archive
- Upgrading symfony/translation (v5.4.12 => v6.1.4): Extracting archive
- Downgrading topthink/think-swoole (v4.0.7 => v4.0.0): Extracting archive
Package guzzlehttp/ringphp is abandoned, you should avoid using it. No replacement was suggested.
Package guzzlehttp/streams is abandoned, you should avoid using it. No replacement was suggested.
Package overtrue/wechat is abandoned, you should avoid using it. Use w7corp/easywechat instead.
Generating autoload files
> @php think service:discover
Succeed!
> @php think vendor:publish
File /www/wwwroot/www.zhuanzhuan.com/config/captcha.php exist!
File /www/wwwroot/www.zhuanzhuan.com/config/queue.php exist!
File /www/wwwroot/www.zhuanzhuan.com/config/swoole.php exist!
Succeed!
34 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
关键字词:composer,update,忽略,依赖,限制
相关文章
- 17-依赖范围详解
- 16-编写Servlet-依赖范围配置(maven项目实现servlet)
- 12-使用依赖导入jar包(pom中dependencies的配置)
- 24_案例_验证码_代码实现(equalsIgnoreCase在比较字符
- ffmpeg命令行推流向nginx的rtmp模塊推流出現錯誤Faile
- docker-composer創建項目的默認網絡
- docker-composer脚本編寫系列之nginx與php的結合
- workerman常用组件-MySQL组件-workerman之使用Workerm
- 使用php7.3.4与composer安装workerman及composer指定p
- java如何编译有jar依赖的java文件(纯命令行)java使用red