2

I've been trying to install Google's ClientAPI, but it's got tons of dependency issues. I've searched the web, with no luck whatsoever.

I tried to install the faulty dependencies myself, but they had the same issue. Here's the message I'm getting:

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.

At this point all I can think of is to install ClientAPI outside of composer, but I don't know if it's a good idea or not!

And here's my composer.json file (only the relevant parts):

"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"
},
Milad.Nozari
  • 2,243
  • 3
  • 26
  • 47
  • Try to switch `guzzlehttp/guzzle` to version 6.0. – thefallen Sep 26 '16 at 10:42
  • Based on the error message it looks like you should try (at least for now) downgrading your guzzle version to 5.2.0 instead of 6.1 – tam5 Sep 26 '16 at 11:15
  • Didn't work: `kozz/laravel-guzzle-provider 6.0 requires guzzlehttp/guzzle ~6.0 -> satisfiable by guzzlehttp/guzzle[6.2.x-dev].` – Milad.Nozari Sep 26 '16 at 11:22

3 Answers3

1

The problem is there is conflict between your old package requirements and you new package requirements.

This is worst part of composer or disadvantage of composer.

you have to manually install a package version which is satisfiable with both package. And trust me it is very hard to do.

kenorb
  • 155,785
  • 88
  • 678
  • 743
sunny kashyap
  • 2,193
  • 2
  • 19
  • 29
1

I found a solution on GitHub google API PHP client issues and discussion. That actually solve my problem as well. referring to the original post so that it might also save someone's day.

https://github.com/googleapis/google-api-php-client/issues/969

The idea is to simply add "google/apiclient": "^2.0" directly to composer.json and running composer update.

Alexandre Elshobokshy
  • 10,720
  • 6
  • 27
  • 57
Syed Ekram Uddin
  • 2,907
  • 2
  • 29
  • 33
0

Installation request for phpseclib/phpseclib (locked at 0.3.10)

Installation request for guzzlehttp/psr7 (locked at 1.4.x-dev)

It seems that some packages are "locked at" specific versions (as per your composer.lock).

To see why they're locked, run:

composer why org/package -t

You may try to update these dependencies by:

composer update --with-dependencies

However, if that won't help, consider removing composer.lock and re-run composer install.

Try also your configuration on the empty folder.

To see the installed dependency tree, run:

composer show -t

To see the requirements for the given package, run for example:

composer show -a google/apiclient 2.0.3

This can give some idea what is wrong. To see more verbose output, add -v to your command.

For further troubleshooting the issue, see:

Community
  • 1
  • 1
kenorb
  • 155,785
  • 88
  • 678
  • 743