Composer removing packages after installing Laravel Sanctum - laravel

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?

Related

installing maatwebsite/excel with laravel 9 but getting the phpoffice/phpspreadsheet errors

installing maatwebsite/excel with Laravel 9 but getting phpoffice and PHP version issues. I am using PHP 8.1, I downgrade to PHP 8.0 but still doesn't work. Even I enable the gd extention from the php.ini file.
I am installing maatwebsite using below command which is offered by official website
composer require maatwebsite/excel
I found the problem it's happening due to cache problem, we need to update the cache version.
Let me explain it with all steps
Go to the php.ini file and remove ;
before
;extension=gd
after
extension=gd
execute the command to change your cache
composer require psr/simple-cache ^2.0
if the above version is not work for you try it with 1.0 version (optional)
composer require psr/simple-cache ^1.0
Then install maatwebsiteexcel
composer require maatwebsite/excel
It will work like a charm
This will help you
composer require psr/simple-cache:^1.0 maatwebsite/excel
Some time composer require fails on Laravel 9 because of the simple-cache dependency, you will have to specify the psr/simple-cache version as ^1.0 in your composer.json to satisfy the PhpSpreadsheet dependency.
find solution here https://docs.laravel-excel.com/3.1/getting-started/installation.html

What is the error I am making when I'm installing the passport dependencies?

Using version ^10.1 for laravel/passport
./composer.json has been updated
Running composer update laravel/passport
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/passport[v10.1.0, ..., 10.x-dev] require illuminate/auth ^8.2 -> found illuminate/auth[v8.2.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/passport ^10.1 -> satisfiable by laravel/passport[v10.1.0, v10.1.1, v10.1.2, 10.x-dev].
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
you must check your project dependencies and laravel dependencies , you can test this remove composer.lock file and run this composer install
You need to upgrade your Laravel or install an older version of Laravel Passport
composer require laravel/passport:X.x.x

laravel ckeditor installation

I have install Laravel previously and it works perfectly but now when I fire command composer require unisharp/laravel-ckeditor it installs "unisharp/laravel-filemanager": "~1.8".
I have also try to install it using this link but its not worked..
I guess author have changes the package..
Anyone have any idea about it?
use
composer require ckeditor/ckeditor
result
akash#localhost /var/www/html/lara57 $ composer require ckeditor/ckeditor
Using version ^4.11 for ckeditor/ckeditor
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing ckeditor/ckeditor (4.11.3): Downloading (100%)
Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead.
Writing lock file

Can't install guzzlehttp

I am using PHP 5.6 and I have Laravel 5.4 for my development. When I try to install guzzlehttp through composer for my Laravel I get error that my requirements could not be resolved to an installable set of packages..
cmd error
here's my composer.json
composer.json
what should i do. Thank you

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