php - 使用 Composer 在 Laravel 5.x 中安装 Google 的 ClientAPI

标签 php laravel-5 composer-php google-api-client

我一直在尝试安装 Google 的 ClientAPI,但它存在大量依赖性问题。我在网上搜索过,但没有任何运气。

我尝试自己安装有问题的依赖项,但他们也有同样的问题。这是我收到的消息:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - google/apiclient v2.0.0-RC3 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
    - google/apiclient v2.0.0-RC2 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
    - google/apiclient v2.0.0-RC1 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
    - Conclusion: don't install google/apiclient 2.x-dev
    - Conclusion: don't install google/apiclient v2.0.3
    - Installation request for phpseclib/phpseclib (locked at 0.3.10) -> satisfiable by phpseclib/phpseclib[0.3.10].
    - Conclusion: don't install google/apiclient v2.0.2
    - Conclusion: don't install google/apiclient v2.0.1
    - google/apiclient v2.0.0 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
    - google/apiclient v2.0.0-RC8 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
    - Conclusion: don't install google/auth v0.8
    - Installation request for guzzlehttp/psr7 (locked at 1.4.x-dev) -> satisfiable by guzzlehttp/psr7[1.4.x-dev].
    - google/apiclient v2.0.0-RC6 requires google/auth 0.7 -> satisfiable by google/auth[v0.7].
    - google/apiclient v2.0.0-RC7 requires google/auth 0.7 -> satisfiable by google/auth[v0.7].
    - Conclusion: don't install google/auth v0.7
    - google/apiclient v2.0.0-RC4 requires google/auth 0.5 -> satisfiable by google/auth[v0.5].
    - google/apiclient v2.0.0-RC5 requires google/auth 0.5 -> satisfiable by google/auth[v0.5].
    - Conclusion: don't install google/auth v0.5
    - Installation request for google/apiclient ^2.0 -> satisfiable by google/apiclient[2.x-dev, v2.0.0, v2.0.0-RC1, v2.0.0-RC2, v2.0.0-RC3, v2.0.0-RC4, v2.0.0-RC5, v2.0.0-RC6, v2.0.0-RC7, v2.0.0-RC8, v2.0.1, v2.0.2, v2.0.3].


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

此时我能想到的就是在composer之外安装ClientAPI,但我不知道这是否是一个好主意!

这是我的 composer.json 文件(仅相关部分):

"minimum-stability": "dev",
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.2.*",
    "tymon/jwt-auth": "0.5.*",
    "barryvdh/laravel-cors": "^0.8.0",
    "laravel/socialite": "^2.0",
    "guzzlehttp/guzzle": "^6.1",
    "intervention/image": "^2.3",
    "kozz/laravel-guzzle-provider": "^6.0",
    "symfony/psr-http-message-bridge": "^0.2.0",
    "fairholm/elasticquent": "dev-feature/laravel-5",
    "graham-campbell/flysystem": "^3.3",
    "league/flysystem-sftp": "^1.0",
    "netshell/paypal": "dev-master",
    "facebook/php-sdk-v4": "~5.0"
},

最佳答案

问题是您的旧软件包要求和新软件包要求之间存在冲突。

这是 Composer 最糟糕的部分或 Composer 的缺点。

您必须手动安装两个软件包都可以满足的软件包版本。相信我,这很难做到。

关于php - 使用 Composer 在 Laravel 5.x 中安装 Google 的 ClientAPI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39699344/

相关文章:

php - 在自定义 style.css 文件中的一些更改时,它没有显示 wordpress "[...]"中帖子页面的完整内容

php - 在 Eloquent 模型中使用特征时总是渴望加载关系

php - 如何让 Composer/PSR-4 接受子文件夹中的第二个命名空间?

php - Composer 更新显示 mmap() 失败 : [12] Cannot allocate memory

php - 如何用三元运算符替换 "if"语句(?: )?

php - 登记表 - 上传图片

php - 找不到 Laravel 5 函数 ()

php - whereBetween Eloquent 查询返回空输出

php - 如何更改 composer 使用的 PHP 版本

php - 通过 Google_Service_AnalyticsReporting_Report 获取下一个报告页面