How to install socialite in laravel 5.7 using composer? - composer-php

I'm trying to install socialite in laravel 5.7. But it seems that the installer package not found. Here is how it looks:
composer require laravel/socialite
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
The "http://packagist.org/p/paragonie/random_compat%24db1b5c1b43ef534aed7fe377b7d6e9ada59ee25deed500ba426fd9e421116aa3.json" file could not be downloaded: failed to open stream: HTTP request failed!
http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
I've tried using composer require laravel/socialite and composer require laravel/socialite "^3.2.0" but get the same problem.

I finally got the solution from here
So what I do is adding this lines to composer.json file
"repositories": [
{
"packagist": false
},
{
"type": "composer",
"url": "https://packagist.org/"
}
],
As you can see composer requires https while laravel use http by default.

"^3.2.0" this is for laravel 5.6 for laravel 5.7 frame work try this
composer require laravel/socialite "4.0"

Related

Composer removing packages after installing Laravel Sanctum

I am trying to install Laravel Sanctum following the instructions on Laravel's website: https://laravel.com/docs/8.x/sanctum
I run this command composer require laravel/sanctum and Laravel Sanctum is successfully installed:
Using version ^2.11 for laravel/sanctum ./composer.json has been
updated Loading composer repositories with package information
However, it seems like installing Sanctum is also removing default Laravel Packages:
Package operations: 12 installs, 82 updates, 7 removals
Removing symfony/polyfill-php70 (v1.18.0)
So my question is:
How do I install Sanctum without removing other packages?

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.

How to fix error abandoned fzaninotto/faker packagist in composer 2.0.11 version and i used php 8.0.0?

How to fix fzaninotto/faker packagist
"This package is abandoned and no longer maintained. No replacement package was suggested."
in composer 2.0.11 version and i used php 8.0.0?
The quick way is
composer remove fzaninotto/faker
Then install
composer require fakerphp/faker --dev
You can use the new package faker (fork).
Remove the faker abandoned
composer remove vendor/fzaninotto/faker
Install the new package
composer require fakerphp/faker
And replace it in your composer.json
"require-dev": {
"fakerphp/faker": "^1.13.0",
}

ovh/ovh requires guzzlehttp^6.0 while therobfonz/laravel-mandrill-driver requires guzzlehttp^7.0: is there any solution?

In my Laravel 8 project I had to install the mailer therobfonz/laravel-mandrill-driver; now I have to install the SMS driver ovh/ovh.
For the moment in my composer.json file I have:
"guzzlehttp/guzzle": "^7.0",
"therobfonz/laravel-mandrill-driver": "^3.0"
When I type: composer require ovh/ovh, I have this error:
ovh/ovh v2.1.0 requires guzzlehttp/guzzle ^6.0 -> found guzzlehttp/guzzle[6.0.0, ..., 6.5.x-dev] but it conflicts with your root composer.json require (^7.0).
I have tried to edit composer.json by changing the version of guzzle to "^6.0", then doing composer update. However this results in an error (mandrill requires guzzle ^7.0).
What could I do?
OVH v3.0.0 works with Guzzle 7.0
https://github.com/ovh/php-ovh/blob/75852ad0fee8008b6245d72a7d3ba7f09cb456ae/composer.json
Maybe you should just update OVH?

Can I solve "Your requirements could not be resolved to an installable set of packages." in laravel composer

when I want to install laravel/ui the composer show this:
and my composer.json :
my laravel version is 6.13 and I went to laravel.com and I click the Authentication for laravel 6X and says for laravel 6 you have to install this package and the package is composer require laravel/ui "^1.0" --dev and composer show me that problem again what can I do?
Add this in composer.json and then use command composer update
"laravel/ui": "^1.2",
Sometimes the library which you're installing is not satisfied PHP version not only laravel version.

Resources