laravel / socialite

Laravel wrapper around OAuth 1 & OAuth 2 libraries.
https://laravel.com/docs/socialite
MIT License
5.58k stars 939 forks source link

Socialite installation will have the default packages removed #696

Closed KanCiGamer closed 8 months ago

KanCiGamer commented 8 months ago

Socialite Version

^5.12

Laravel Version

^10.10

PHP Version

^8.1

Database Driver & Version

MySQL 8.2.0

Description

When I use the command: Composer require laravel/socialite, it removes default packages like tinker, framework which affects my project and it cannot launch. I also cannot reinstall those packages using the composer update... command. My composer.json:

{ "name": "laravel/laravel", "type": "project", "description": "The skeleton application for the Laravel framework.", "keywords": ["laravel", "framework"], "license": "MIT", "require": { "php": "^8.1", "guzzlehttp/guzzle": "^7.2", "laravel/framework": "^10.10", "laravel/sanctum": "^3.3", "laravel/tinker": "^2.8", "laravel/socialite": "^5.12" }, "require-dev": { "fakerphp/faker": "^1.9.1", "laravel/pint": "^1.0", "laravel/sail": "^1.18", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^7.0", "phpunit/phpunit": "^10.1", "spatie/laravel-ignition": "^2.0" }, "autoload": { "psr-4": { "App\": "app/", "Database\Factories\": "database/factories/", "Database\Seeders\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Tests\": "tests/" } }, "scripts": { "post-autoload-dump": [ "Illuminate\Foundation\ComposerScripts::postAutoloadDump", "https://github.com/php artisan package:discover --ansi" ], "post-update-cmd": [ "https://github.com/php artisan vendor:publish --tag=laravel-assets --ansi --force" ], "post-root-package-install": [ "https://github.com/php -r "file_exists('.env') || copy('.env.example', '.env');"" ], "post-create-project-cmd": [ "https://github.com/php artisan key:generate --ansi" ] }, "extra": { "laravel": { "dont-discover": [] } }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true, "php-http/discovery": true } }, "minimum-stability": "stable", "prefer-stable": true }

Steps To Reproduce

I don't do this step

KanCiGamer commented 8 months ago

I just want to install laravel/socialite but every time I install it, it deletes default packages like framework or tinker.. and crashes my whole project. I don't know how to fix it

crynobone commented 8 months ago

composer require doesn't have the ability to delete other requirements.

KanCiGamer commented 8 months ago

@crynobone I don't know what I installed wrong that caused this problem. You can see the information when I used composer require below: `PS E:\TestAPI\GoogleAPI2> composer require laravel/socialite
D:\Composer has been updated Running composer update laravel/socialite Loading composer repositories with package information Updating dependencies Nothing to modify in lock file Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 44 installs, 3 updates, 64 removals

crynobone commented 8 months ago
Running composer update laravel/socialite
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file

Based on above information it's clear that:

  1. laravel/socialite requirements already exists in composer.lock.
  2. laravel/framework requirements is not available in composer.lock.
KanCiGamer commented 8 months ago

So what exactly should I do? I'm new and don't know how to determine exactly how to fix it. Please help me, thank you

KanCiGamer commented 8 months ago

I have solved the problem