composer require laravel/socialite ^2.0
is failing with below error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/socialite 2.0 -> satisfiable by laravel/socialite[v2.0.0].
- Conclusion: remove guzzlehttp/guzzle 6.2.2
- Conclusion: don't install guzzlehttp/guzzle 6.2.2
- laravel/socialite v2.0.0 requires guzzlehttp/guzzle ~4.0 -> satisfiable by guzzlehttp/guzzle[4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.2.0, 4.2.1, 4.2.2, 4.2.3, 4.2.4].
- Can only install one of: guzzlehttp/guzzle[4.0.0, 6.2.2].
...
- Can only install one of: guzzlehttp/guzzle[4.2.4, 6.2.2].
- Installation request for guzzlehttp/guzzle (locked at 6.2.2) -> satisfiable by guzzlehttp/guzzle[6.2.2].
Installation failed, reverting ./composer.json to its original content.
Laravel version is 5.3.22
PHP version is 7.0.10
The composer.json of socialite2.0 on github shows the dependency as guzzlehttp 5.0/ 6.0. Why's my install looking for guzzlehttp 4.0?
EDIT-1:
I tried to force guzzlehttp 4.2.4 by adding it in composer.json require-dev.
However, I received following error:
Problem 1
- The requested package guzzlehttp/guzzle (locked at 6.2.2, required as 4.2.4) is satisfiable by guzzlehttp/guzzle[6.2.2] but these conflict with your requirements or minimum-stability.
Problem 2
- aws/aws-sdk-php 3.19.23 requires guzzlehttp/guzzle ^5.3.1|^6.2.1 -> satisfiable by guzzlehttp/guzzle[5.3.1, 5.3.2, 5.3.x-dev, 6.2.1, 6.2.2, 6.2.3, 6.3.0, 6.2.x-dev] but these conflict with your requirements or minimum-stability.
- aws/aws-sdk-php 3.19.23 requires guzzlehttp/guzzle ^5.3.1|^6.2.1 -> satisfiable by guzzlehttp/guzzle[5.3.1, 5.3.2, 5.3.x-dev, 6.2.1, 6.2.2, 6.2.3, 6.3.0, 6.2.x-dev] but these conflict with your requirements or minimum-stability.
- aws/aws-sdk-php 3.19.23 requires guzzlehttp/guzzle ^5.3.1|^6.2.1 -> satisfiable by guzzlehttp/guzzle[5.3.1, 5.3.2, 5.3.x-dev, 6.2.1, 6.2.2, 6.2.3, 6.3.0, 6.2.x-dev] but these conflict with your requirements or minimum-stability.
- Installation request for aws/aws-sdk-php (locked at 3.19.23) -> satisfiable by aws/aws-sdk-php[3.19.23].
Apparently, aws-sdk-php requires guzzlehttp 5.3/ 6.2. Laravel 5.3 is not compatible with socialite 3.0. Socialite 2.0 is not compatible with guzzlehttp 5.3/ 6.2.
How to resolve this?
TIA
EDIT-2:
my composer.json has below content:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"doctrine/dbal": "^2.5",
"aws/aws-sdk-php-laravel": "~3.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
guzzlehttp 4.2.4
torequire-dev
revealed aws-sdk-php dependency. upgrading Laravel version or downgrading aws-sdk-php requires lot of effort, to validate the application. Unfortunately, that's not an option.. – Krishna Chebrolu