Laravel Socialite can't be installed in upgraded version 5.6 - laravel

I have upgraded the laravel from 5.5 to 5.6 and try to install laravel/socialite but there is error.
Composer.json

I think the autoloader is jammed up and needs to be cleared.
Try running
composer dump-autoload
php artisan clear-compiled
composer require laravel/socialite

Looks like you need to install the version ^3.2.0 for the package if you are using laravel 5.6, not the ^3.0 or ^4.0 so, you need to be explicit about the version:
composer require laravel/socialite "^3.2.0"
Docs: https://laravel.com/docs/5.6/socialite#installation

Related

Why i cannot install Laravel Breeze

I installed a fresh laravel application using version 7.30.4. When I tried to install laravel breeze, using command composer require laravel/breeze --dev, it gives me this error.
[InvalidArgumentException]
Package laravel/breeze has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version
My current version of PHP is 7.2.19
This error comes due to compatible version in your composer.json file. To fix this issue, change the composer.json file "platform" configuration:
"platform": {
"php": "7.3"
}
Then execute composer install or composer update
or you can run the below command:
composer config platform.php 7.4.3
Laravel breeze required PHP version 7.3 and as you said your PHP version is 7.2.19 so you have to update it.

laravel new blog not work mockery/mockery 1.4.0

Today I wanted to create a new project with Laravel with this command
laravel new blog
But I get this error
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for mockery/mockery 1.4.0 -> satisfiable by mockery/mockery[1.4.0].
- mockery/mockery 1.4.0 requires php ^7.3.0 -> your PHP version (7.2.23) does not satisfy that requirement.
Why should php7.3 be read when Laravel himself says at least php7.2.5 ???
Run composer update.
The reason:
Your PHP version is too low. You've got 7.2.23 installed, and mockery/mockery 1.4 requires 7.3.0
The best solution is to upgrade your PHP version. Alternatively, you can reduce mockery's version to 1.3.1, which only requires PHP 5.6 or above.
My bug report can be found here
As of 2020-05-21, the zip files that laravel new ___ uses will try to install mockery/mockery version 1.4. This won't work with versions of PHP below 7.3. In order to fix this, run composer update, and mockery will be downgraded to a compatible version.
I had the same problem today for new Laravel projects. The composer.json file was showing "mockery/mockery": "^1.3.1" but still was showing the same error. Delete also the composer.lock file and run composer install.
Assuming you are trying to create a new laravel project called blog this is what I did to fix the error after running laravel new blog
cd into blog
run composer update
Create a .env file. You can just make a copy of .env.example and rename the copy to .env. In case you try to start the dev server using php artisan serve and the app launches with a 500 error, run these commands:
php artisan key:generate
php artisan cache:clear
php artisan config:clear
composer dump-autoload
I had the problem when trying to create new Laravel applications,I updated php version using the following commands and it worked.
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt install -y php7.4 php7.4-gd php7.4-mbstring php7.4-xml
Delete the composer.lock file and run composer again
composer install
You can just run
composer create-project --prefer-dist laravel/laravel <project_name>
It'll automatically fall-back to mockery^1.3.1
I also faced these problems.
Problem 1
- Installation request for facade/ignition-contracts 1.0.2 -> satisfiable by facade/ignition-contracts[1.0.2].
- facade/ignition-contracts 1.0.2 requires php ^7.3|^8.0 -> your PHP version (7.2.34) does not satisfy that requirement.
Problem 2
- Installation request for mockery/mockery 1.4.2 -> satisfiable by mockery/mockery[1.4.2].
- mockery/mockery 1.4.2 requires php ^7.3 || ^8.0 -> your PHP version (7.2.34) does not satisfy that requirement.
Problem 3
- facade/ignition-contracts 1.0.2 requires php ^7.3|^8.0 -> your PHP version (7.2.34) does not satisfy that requirement.
- nunomaduro/collision v4.2.0 requires facade/ignition-contracts ^1.0 -> satisfiable by facade/ignition-contracts[1.0.2].
- Installation request for nunomaduro/collision v4.2.0 -> satisfiable by nunomaduro/collision[v4.2.0].
I had deleted the composer.lock file and executed composer install command.
My problem solved.
This might be stale, the issue here is that the php needs to be updated to version that will be compatible.
delete the composer.lock file and autoload file in vendor i.e vendor/autoload in your project
upgrade php version from php.net
run composer install --no scripts
run composer update
php artisan migrate
php artisan key:generate

Laravel/socialite Composer package 5.6 or 5.7

I'm starting to install the laravel/socialite. I have the Laravel 5.6 installed, so should I use composer require laravel/socialite "^3.2.0" based on the documentation from https://laravel.com/docs/5.6/socialite or can I use composer require laravel/socialite based on the https://laravel.com/docs/5.7/socialite.
If you use Laravel 5.6 then I think you should install
composer require laravel/socialite "^3.2.0"
If you use composer require laravel/socialite you can get an error, and this command trying to install version 4.0 which is not supported in Laravel 5.6

Cannot install composer laravel/socialite

I am having error in installing laravel/socialite in my laravel 5.2 project.
I tried this -- composer laravel/socialite but gets an error like this.
Please help me.
You should write this
composer require laravel/socialite
this is the command. Use this
To install a package to laravel using composer you need to add require method after composer
Try doing like this
composer require laravel/socialite

Can't install guzzlehttp for Laravel

I am using PHP 5.4 and I have Laravel 5.1 for my development. When I try to install guzzlehttp through composer for my Laravel I get error that your PHP 5.4 doesn't specify the requirements.
i tried to install it by lowering the version like
composer require "guzzlehttp/guzzle": "5.0"
but still with no luck.
try,
composer require "guzzlehttp/guzzle:~5.3"

Resources