Search code examples
phplaravel-5composer-phpgoogle-api-client

install Google's ClientAPI in Laravel 5.x with Composer


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"
},

Solution

  • 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.