Php 为什么composer update--Preference Lower会根据是否安装了依赖项而产生不同的结果? 重现问题所需的步骤 1.创建composer.json 2.运行以下命令 预期结果

Php 为什么composer update--Preference Lower会根据是否安装了依赖项而产生不同的结果? 重现问题所需的步骤 1.创建composer.json 2.运行以下命令 预期结果,php,composer-php,Php,Composer Php,依赖项可以解析为一组可安装的包 实际结果 可能的解决办法 我可以通过运行来解决这个问题 $ composer install $ composer update --prefer-lowest 但首先,为什么我需要先安装依赖项,然后才能更新它们 $ composer update --prefer-lowest Loading composer repositories with package information Updating dependencies (including req

依赖项可以解析为一组可安装的包

实际结果 可能的解决办法 我可以通过运行来解决这个问题

$ composer install
$ composer update --prefer-lowest
但首先,为什么我需要先安装依赖项,然后才能更新它们

$ composer update --prefer-lowest
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.


  Problem 1
    - knplabs/github-api 2.5.0 requires php-http/client-common ^1.3 -> satisfiable by php-http/client-common[1.3.0, 1.5.0, v1.4.0, v1.4.1, v1.4.2].
    - knplabs/github-api 2.6.0 requires php-http/client-common ^1.3 -> satisfiable by php-http/client-common[1.3.0, 1.5.0, v1.4.0, v1.4.1, v1.4.2].
    - Conclusion: don't install php-http/client-common 1.5.0
    - Conclusion: don't install php-http/client-common v1.4.2
    - Conclusion: don't install php-http/client-common v1.4.1
    - Conclusion: don't install php-http/client-common v1.4.0
    - Conclusion: don't install php-http/client-common 1.3.0
    - Installation request for knplabs/github-api ^2.5.0 -> satisfiable by knplabs/github-api[2.5.0, 2.6.0].
$ composer install
$ composer update --prefer-lowest