Php 编写器错误:安装失败,将./composer.json还原为其原始内容

Php 编写器错误:安装失败,将./composer.json还原为其原始内容,php,composer-php,phar,Php,Composer Php,Phar,我尝试通过composer安装我的php项目 composer.json: { "require": { "Intervention/image": "~2.3.7", "intervention/image": "^2.3", "guzzlehttp/guzzle": "^6.2" } } 我运行以下命令: composer require google/apiclient:^2.0 结果: ./composer.json

我尝试通过composer安装我的php项目

composer.json:

{
    "require": {
        "Intervention/image": "~2.3.7",
        "intervention/image": "^2.3",
        "guzzlehttp/guzzle": "^6.2" 
    }
}
我运行以下命令:

composer require google/apiclient:^2.0
结果:

./composer.json has been updated
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
    - google/apiclient v2.0.0 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
    - Installation request for google/apiclient 2.0 -> satisfiable by google/apiclient[v2.0.0].
    - Conclusion: remove guzzlehttp/psr7 1.3.0
    - Conclusion: don't install guzzlehttp/psr7 1.3.0
    - google/auth v0.8 requires guzzlehttp/psr7 1.2.* -> satisfiable by guzzlehttp/psr7[1.2.0, 1.2.1, 1.2.2, 1.2.3].
    - Can only install one of: guzzlehttp/psr7[1.2.0, 1.3.0].
    - Can only install one of: guzzlehttp/psr7[1.2.1, 1.3.0].
    - Can only install one of: guzzlehttp/psr7[1.2.2, 1.3.0].
    - Can only install one of: guzzlehttp/psr7[1.2.3, 1.3.0].
    - Installation request for guzzlehttp/psr7 (locked at 1.3.0) -> satisfiable by guzzlehttp/psr7[1.3.0].


Installation failed, reverting ./composer.json to its original content.

此外,我还安装了
php composer.phar require guzzlehttp/guzzle
,在…

之前,我会尝试删除您的项目对
guzzlehttp/guzzle
的要求,并让您的谷歌依赖项告诉composer它想要的版本。谷歌的软件包(出于某种原因)的http/psr7的最低版本为1.2,而composer则抱怨说,它不知道如何满足这一要求

由于您的新依赖项(谷歌软件包)也需要
guzzlehttp/guzzle
,因此您不需要特别要求它,因此我只需删除它,然后再次尝试
composer update

可能重复的