linux
PHP 版本 8.0.8
laravel 版本 8.80.0
执行命令 composer require alibabacloud/sdk 出错,提示以下问题
Your requirements could not be resolved to an installable set of packages.
Problem 1
- tymon/jwt-auth is locked to version 1.0.2 and an update of this package was not requested.
- tymon/jwt-auth 1.0.2 requires php ^5.5.9|^7.0 -> your php version (8.0.8) does not satisfy that requirement.
Problem 2
- fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested.
- fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.0.8) does not satisfy that requirement.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require alibabacloud/sdk:*" to figure out if any version is installable, or "composer require alibabacloud/sdk:^2.1" if you know which you need.
百度后找到这个文章 分享:[记一次] composer install --ignore-platform-reqs 解决版本冲突 ,
执行命令 composer require alibabacloud/sdk –ignore-platform-reqs
成功.
所以有个问题,执行 composer require 时,如果里面需要的依赖 A 已经存在,就会更新这个依赖 A 的版本吗,还是执行 composer require 时,会同时执行 composer update?