Problem installing league/flysystem-aws-s3-v3 league/flysystem ^2.0 required but stuck at 1.1.3 - laravel

I am attempting to install league/flysystem-aws-s3-v3 with laravel but receive the following:
Problem 1
- The requested package league/flysystem (locked at 1.1.3, required as ^2.0) is satisfiable by league/flysystem[1.1.3] but these conflict with your requirements or minimum-stability.
Problem 2
- Conclusion: remove laravel/framework v7.28.4
- Conclusion: don't install laravel/framework v7.28.4
- Conclusion: don't install league/flysystem 2.0.2
- Conclusion: don't install league/flysystem 2.0.1
- Conclusion: don't install league/flysystem 2.0.0
- Conclusion: don't install league/flysystem 2.0.0-RC1
- Conclusion: don't install league/flysystem 2.0.0-beta.3
- Conclusion: don't install league/flysystem 2.0.0-beta.2
- Conclusion: don't install league/flysystem 2.0.0-beta.1
- Conclusion: don't install league/flysystem 2.0.0-alpha.4
- Conclusion: don't install league/flysystem 2.0.0-alpha.3
- Conclusion: don't install league/flysystem 2.0.0-alpha.2
- Installation request for laravel/framework (locked at v7.28.4, required as ^7.24) -> satisfiable by laravel/framework[v7.28.4].
- Conclusion: don't install league/flysystem 2.0.0-alpha.1
- laravel/framework v7.28.4 requires league/flysystem ^1.0.34 -> satisfiable by league/flysystem[1.0.x-dev, 1.x-dev].
- Can only install one of: league/flysystem[2.x-dev, 1.x-dev].
- Can only install one of: league/flysystem[2.x-dev, 1.0.x-dev].
- Installation request for league/flysystem ^2.0 -> satisfiable by league/flysystem[2.0.0, 2.0.0-RC1, 2.0.0-alpha.1, 2.0.0-alpha.2, 2.0.0-alpha.3, 2.0.0-alpha.4, 2.0.0-beta.1, 2.0.0-beta.2, 2.0.0-beta.3, 2.0.1, 2.0.2, 2.x-dev].
When I try to update league/flysystem I receive the following:
Problem 1
- Conclusion: remove laravel/framework v7.28.4
- Conclusion: don't install laravel/framework v7.28.4
- Conclusion: don't install league/flysystem 2.0.2
- Conclusion: don't install league/flysystem 2.0.1
- Conclusion: don't install league/flysystem 2.0.0
- Conclusion: don't install league/flysystem 2.0.0-RC1
- Conclusion: don't install league/flysystem 2.0.0-beta.3
- Conclusion: don't install league/flysystem 2.0.0-beta.2
- Conclusion: don't install league/flysystem 2.0.0-beta.1
- Conclusion: don't install league/flysystem 2.0.0-alpha.4
- Conclusion: don't install league/flysystem 2.0.0-alpha.3
- Conclusion: don't install league/flysystem 2.0.0-alpha.2
- Installation request for laravel/framework (locked at v7.28.4, required as ^7.24) -> satisfiable by laravel/framework[v7.28.
- Conclusion: don't install league/flysystem 2.0.0-alpha.1
- laravel/framework v7.28.4 requires league/flysystem ^1.0.34 -> satisfiable by league/flysystem[1.0.x-dev, 1.x-dev].
- Can only install one of: league/flysystem[2.x-dev, 1.x-dev].
- Can only install one of: league/flysystem[2.x-dev, 1.0.x-dev].
- Installation request for league/flysystem ^2.0 -> satisfiable by league/flysystem[2.0.0, 2.0.0-RC1, 2.0.0-alpha.1, 2.0.0-alp
I am also unable to remove league/flysystem or update laravel

You're using Laravel 7 (although the same is true for Laravel 8), if you take a look at the laravel/framework composer.json file, you will see that it is requiring version 1; "league/flysystem": "^1.1"
Per composer constraints, this will allow any version from 1.1 to less than 2 (>=1.1 <2).
Now it is technically possible to install 2 different versions of a package, but I'd highly advise against it as you have to monkey with the autoloader to change the namespace for one version of the package. This answer covers the details on how to do it if you absolutely must.

If you are using laravel/framework version >= 8. Try running this command in your console. It worked for me.
composer require league/flysystem-aws-s3-v3

Related

Composer require / update issues [duplicate]

This question already has answers here:
Reference - Composer error "Your PHP version does not satisfy requirements" after upgrading PHP
(3 answers)
Closed 8 months ago.
Appreciate this is a common issue but I never understand what Composer is suggesting / wants from me when it throws these sorts of issues.
I have a Laravel app that I'm trying to install a new package into.
The following are the errors, how am I supposed to interpret what it's saying?
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v8.9.0 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
- laravel/framework v8.8.0 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
- laravel/framework v8.7.1 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
- laravel/framework v8.7.0 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
- laravel/framework v8.6.0 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
- laravel/framework v8.5.0 requires php ^7.3 -> your PHP version (8.0.15) does not satisfy that requirement.
... more of the same errors
- Conclusion: don't install laravel/framework v8.83.17
- Conclusion: don't install laravel/framework v8.83.16
- Conclusion: don't install laravel/framework v8.83.15
- Conclusion: don't install laravel/framework v8.83.14
- Conclusion: don't install laravel/framework v8.83.13
- Conclusion: don't install laravel/framework v8.83.12
... more of the same
- Installation request for laravel/framework (locked at v8.21.0, required as ^8.0) -> satisfiable by laravel/framework[v8.21.0].
- Installation request for spatie/laravel-health ^1.9 -> satisfiable by spatie/laravel-health[1.9.0, 1.9.1, 1.9.2].
- Can only install one of: laravel/framework[9.x-dev, 8.x-dev].
- Can only install one of: laravel/framework[v8.12.0, 9.x-dev].
- Can only install one of: laravel/framework[v8.12.1, 9.x-dev].
... more of the same
- Conclusion: install laravel/framework 9.x-dev
- Installation request for laravel/framework ^8.0 -> satisfiable by laravel/framework[8.x-dev, v8.0.0, v8.0.1, v8.0.2, v8.0.3, v8.0.4, v8.1.0, v8.10.0, v8.11.0, v8.11.1, v8.11.2, v8.12.0, v8.12.1, v8.12.2, v8.12.3, v8.13.0, v8.14.0, v8.15.0, v8.16.0, v8.16.1, v8.17.0, v8.17.1, v8.17.2, v8.18.0, v8.18.1, v8.19.0, v8.2.0, v8.20.0, v8.20.1, v8.21.0, v8.22.0, v8.22.1, v8.23.0, v8.23.1, v8.24.0, v8.25.0, v8.26.0, v8.26.1, v8.27.0, v8.28.0, v8.28.1, v8.29.0, v8.3.0, v8.30.0, v8.30.1, v8.31.0, v8.32.0, v8.32.1, v8.33.0, v8.33.1, v8.34.0, v8.35.0, v8.35.1, v8.36.0, v8.36.1, v8.36.2, v8.37.0, v8.38.0, v8.39.0, v8.4.0, v8.40.0, v8.41.0, v8.42.0, v8.42.1, v8.43.0, v8.44.0, v8.45.0, v8.45.1, v8.46.0, v8.47.0, v8.48.0, v8.48.1, v8.48.2, v8.49.0, v8.49.1, v8.49.2, v8.5.0, v8.50.0, v8.51.0, v8.52.0, v8.53.0, v8.53.1, v8.54.0, v8.55.0, v8.56.0, v8.57.0, v8.58.0, v8.59.0, v8.6.0, v8.60.0, v8.61.0, v8.62.0, v8.63.0, v8.64.0, v8.65.0, v8.66.0, v8.67.0, v8.68.0, v8.68.1, v8.69.0, v8.7.0, v8.7.1, v8.70.0, v8.70.1, v8.70.2, v8.71.0, v8.72.0, v8.73.0, v8.73.1, v8.73.2, v8.74.0, v8.75.0, v8.76.0, v8.76.1, v8.76.2, v8.77.0, v8.77.1, v8.78.0, v8.78.1, v8.79.0, v8.8.0, v8.80.0, v8.81.0, v8.82.0, v8.83.0, v8.83.1, v8.83.10, v8.83.11, v8.83.12, v8.83.13, v8.83.14, v8.83.15, v8.83.16, v8.83.17, v8.83.2, v8.83.3, v8.83.4, v8.83.5, v8.83.6, v8.83.7, v8.83.8, v8.83.9, v8.9.0].
You have to upgrade your laravel version to correspond with your PHP 8.0.15 (switch to Laravel version 9) or downgrade your php version to works with Laravel 8.* so use PHP 7.4.30 but it's not recommanded beacuse PHP 7.4 ends support in 28 Nov 2022.
That's it !

composer require laravel/passport not working in laravel 5.8

I'm using Laravel 5.8 although 6.0.3 is available. I'm using it because the tutorial I'm following is using Laravel 5.8.
When, I command:
composer require laravel/passport
it throws an error
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove laravel/framework v5.8.35
- Conclusion: don't install laravel/framework v5.8.35
- laravel/passport 8.x-dev requires illuminate/encryption ^6.0|^7.0 -> satisfiable by illuminate/encryption[6.x-dev, 7.0.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.2.0, v6.3.0, v6.4.1].
- laravel/passport v8.0.0 requires illuminate/encryption ^6.0|^7.0 -> satisfiable by illuminate/encryption[6.x-dev, 7.0.x-dev, v6.0.0, v6.0.1, v6.0.2, v6.0.3, v6.0.4, v6.1.0, v6.2.0, v6.3.0, v6.4.1].
- don't install illuminate/encryption 6.x-dev|don't install laravel/framework v5.8.35
- don't install illuminate/encryption 7.0.x-dev|don't install laravel/framework v5.8.35
- don't install illuminate/encryption v6.0.0|don't install laravel/framework v5.8.35
- don't install illuminate/encryption v6.0.1|don't install laravel/framework v5.8.35
- don't install illuminate/encryption v6.0.2|don't install laravel/framework v5.8.35
- don't install illuminate/encryption v6.0.3|don't install laravel/framework v5.8.35
- don't install illuminate/encryption v6.0.4|don't install laravel/framework v5.8.35
- don't install illuminate/encryption v6.1.0|don't install laravel/framework v5.8.35
- don't install illuminate/encryption v6.2.0|don't install laravel/framework v5.8.35
- don't install illuminate/encryption v6.3.0|don't install laravel/framework v5.8.35
- don't install illuminate/encryption v6.4.1|don't install laravel/framework v5.8.35
- Installation request for laravel/framework (locked at v5.8.35, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.35].
- Installation request for laravel/passport ^8.0 -> satisfiable by laravel/passport[8.x-dev, v8.0.0].
Installation failed, reverting ./composer.json to its original content.
Latest version of Laravel Passport dropped support for Laravel 5.8
Install earlier version
composer require laravel/passport:7.5.1
From the release notes of Laravel Passport
Changed
Rework HandlesOAuthErrors trait to middleware (#937)
Use a renderable exception for OAuth errors (#1066)
Use diactoros 2.0 and psr-http-factory (aadf603)
Replaced helpers with Blade directives (#939)
Use caret for constraints (d906804)
Dropped support for Laravel 5.8 (654cc09)
Dropped support for PHP 7.1 (3c830ac)
Upgrade to league/oauth2-server 8.0 (97e3026)
You can use this command to install passport on laravel 5.8 projects: composer require laravel/passport "7.5.1" or you can include passport in composer dependecies:
"require": {
...
"laravel/passport": "7.5.1",
....
}
and then run composer update Both will install passport in your project.
composer require laravel/passport works on the latest version of laravel.
You have to download the version according to your laravel version.
So to solve, go-to Laravel docs and select the version you are currently running and then go to Passport it will show you the appropriate version of Passport to install for your version of laravel.

Can't install SweetAlert2 in Laravel 6.0

Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for realrashid/sweet-alert ^2.0 -> satisfiable by realrashid/sweet-alert[v2.0].
- Conclusion: remove laravel/framework v6.0.0
- Conclusion: don't install laravel/framework v6.0.0
- realrashid/sweet-alert v2.0 requires laravel/framework ~5.4.0|~5.8.0|~5.9.0 -> satisfiable by laravel/framework[5.4.x-dev, 5.8.x-dev].
- Can only install one of: laravel/framework[5.8.x-dev, v6.0.0].
- Can only install one of: laravel/framework[5.4.x-dev, v6.0.0].
- Installation request for laravel/framework (locked at v6.0.0, required as ^6.0) -> satisfiable by laravel/framework[v6.0.0].
The realrashid/sweet-alert package has not been updated for use in Laravel 6.0. You will have to wait until it is updated, update the package yourself, or use a different package for SweetAlert2.
Update: The package has been updated for use with Laravel 6.0.
composer require realrashid/sweet-alert

Upgrade laravel project from 5.3 to 5.8

I'm working on a project and i'm trying to upgrade my current version of php 5.6 to 7.3, laravel 5.3 to 5.8 and backpack 0.7 to final version, then ran composer update but all I got was the error below:
Problem 1:
- Conclusion: don't install laravel/framework v5.8.19
- Conclusion: don't install laravel/framework v5.8.18
- Conclusion: don't install laravel/framework v5.8.17
- Conclusion: don't install laravel/framework v5.8.16
- Conclusion: don't install laravel/framework v5.8.15
- Conclusion: don't install laravel/framework v5.8.14
- Conclusion: don't install laravel/framework v5.8.13
- Conclusion: don't install laravel/framework v5.8.12
- Conclusion: don't install laravel/framework v5.8.11
- Conclusion: don't install laravel/framework v5.8.10
- Conclusion: don't install laravel/framework v5.8.9
- Conclusion: don't install laravel/framework v5.8.8
- Conclusion: don't install laravel/framework v5.8.7
- Conclusion: don't install laravel/framework v5.8.6
- Conclusion: don't install laravel/framework v5.8.5
- Conclusion: don't install laravel/framework v5.8.4
- Conclusion: don't install laravel/framework v5.8.3
- Conclusion: don't install laravel/framework v5.8.2
- Conclusion: don't install laravel/framework v5.8.1
- laravelcollective/html v5.3.1 requires illuminate/view 5.3.* -> satisfiable by laravel/framework[v5.3.31], illuminate/view[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- laravelcollective/html v5.3.1 requires illuminate/view 5.3.* -> satisfiable by laravel/framework[v5.3.31], illuminate/view[v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- Can only install one of: laravel/framework[v5.8.0, v5.3.31].
- don't install illuminate/view v5.3.0|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.3.16|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.3.23|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.3.4|don't install laravel/framework v5.8.0
- Installation request for laravel/framework 5.8.* -> satisfiable by laravel/framework[v5.8.0, v5.8.1, v5.8.10, v5.8.11, v5.8.12, v5.8.13, v5.8.14, v5.8.15, v5.8.16, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.3, v5.8.4, v5.8.5, v5.8.6, v5.8.7, v5.8.8, v5.8.9].
- Installation request for laravelcollective/html 5.3.1 -> satisfiable by laravelcollective/html[v5.3.1].
This is composer.json requirement
"require": {
"php": ">=7.3.1",
"laravel/framework": "5.3.*",
"laravelcollective/html": "5.3.1",
"backpack/base": "^0.7.14",
"backpack/crud": "^3.1",
"backpack/permissionmanager": "^2.1",
"backpack/langfilemanager": "^1.0",
"mikehaertl/phpwkhtmltopdf": "2.2.1",
"artisaninweb/laravel-soap": "0.3.0.7",
When upgrading Laravel and/or Backpack, it's recommended that you don't jump versions. I've never tried to jump from L5.3 directly to 5.8, but I do not expect that to work.
Both Laravel and Backpack release upgrade guides with each version. That's because the upgrade process is not just changing a number in the composer.json file. It also involves some steps you need to do manually. Otherwise your app won't work. I know it's inconvenient, but it's the only possible way to upgrade code that you can customize.
My recommendation:
Upgrade to Laravel 5.4 & Backpack 3.2
Then upgrade to Laravel 5.5 & Backpack 3.3
Then upgrade to Laravel 5.6 & Backpack 3.4
Then upgrade to Laravel 5.7 & Backpack 3.5
Then upgrade to Laravel 5.8 & Backpack 3.6
You can automate a good part of the Laravel upgrades using Laravel Shift. It's a paid service that makes pull requests to your Github/Gitlab/Bitbucket repo. You can't automate the Backpack upgrades, I'm afraid, but in most cases the steps will be clear and the changes small.
Hope it helps.

Composer update error with Laravel 5 - 'PHPExcel_Shared_Font' not found

I needed to customize a package I found on packagist, so I cloned the repo on github and updated my composer.json file to get the dependency from there instead.
Now when I run composer update I get the following:
[4.5MB/0.34s] Loading composer repositories with package information
[4.8MB/1.57s] Updating dependencies (including require-dev)
[248.7MB/16.88s] - Removing serverfireteam/blog (master)
[113.1MB/17.54s] Writing lock file
[113.1MB/17.55s] Generating autoload files
Fatal error: Class 'PHPExcel_Shared_Font' not found in C:\Users\Tim\Code\Laravel\config\excel.php on line 174
PHP Fatal error: Class 'PHPExcel_Shared_Font' not found in C:\Users\Tim\Code\Laravel\config\excel.php on line 174
[113.4MB/18.22s] Script php artisan clear-compiled handling the post-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'PHPExcel_Shared_Font' not found in C:\Users\Tim\Code\Laravel\config\excel.php on line 174
I reveresed the change, and ran `composer update' again and get the following message:
[4.4MB/0.33s] Loading composer repositories with package information
[4.7MB/1.48s] Updating dependencies (including require-dev)
[258.9MB/15.11s] Your requirements could not be resolved to an installable set of packages.
[258.9MB/15.11s]
Problem 1
- Conclusion: remove laravel/framework v5.0.33
- Conclusion: don't install laravel/framework v5.0.33
- Conclusion: don't install laravel/framework v5.0.32
- Conclusion: don't install laravel/framework v5.0.31
- Conclusion: don't install laravel/framework 5.0.30
- Conclusion: don't install laravel/framework v5.0.29
- Conclusion: don't install laravel/framework v5.0.28
- Conclusion: don't install laravel/framework v5.0.27
- Conclusion: don't install laravel/framework v5.0.26
- Conclusion: don't install laravel/framework v5.0.25
- Conclusion: don't install laravel/framework v5.0.24
- Conclusion: don't install laravel/framework v5.0.23
- Conclusion: don't install laravel/framework v5.0.22
- Conclusion: don't install laravel/framework v5.0.21
- Conclusion: don't install laravel/framework v5.0.20
- Conclusion: don't install laravel/framework v5.0.19
- Conclusion: don't install laravel/framework v5.0.18
- Conclusion: don't install laravel/framework v5.0.17
- Conclusion: don't install laravel/framework v5.0.16
- Conclusion: don't install laravel/framework v5.0.15
- Conclusion: don't install laravel/framework v5.0.14
- Conclusion: don't install laravel/framework v5.0.13
- Conclusion: don't install laravel/framework v5.0.12
- Conclusion: don't install laravel/framework v5.0.11
- Conclusion: don't install laravel/framework v5.0.10
- Conclusion: don't install laravel/framework v5.0.9
- Conclusion: don't install laravel/framework v5.0.8
- Conclusion: don't install laravel/framework v5.0.7
- Conclusion: don't install laravel/framework v5.0.6
- Conclusion: don't install laravel/framework v5.0.5
- Conclusion: don't install laravel/framework v5.0.4
- Conclusion: don't install laravel/framework v5.0.3
- Conclusion: don't install laravel/framework v5.0.2
- Conclusion: don't install laravel/framework v5.0.1
- serverfireteam/blog master requires illuminate/support ~5.1 -> satisfiable by illuminate/support[v5.1.1, v5.1.2, v5.1.6, v5.1.8].
- serverfireteam/blog dev-master requires illuminate/support ~5.1 -> satisfiable by illuminate/support[v5.1.1, v5.1.2, v5.1.6, v5.1.8].
- don't install illuminate/support v5.1.1|don't install laravel/framework v5.0.0
- don't install illuminate/support v5.1.2|don't install laravel/framework v5.0.0
- don't install illuminate/support v5.1.6|don't install laravel/framework v5.0.0
- don't install illuminate/support v5.1.8|don't install laravel/framework v5.0.0
- Installation request for laravel/framework 5.0.* -> satisfiable by laravel/framework[5.0.30, v5.0.0, v5.0.1, v5.0.10, v5.0.11, v5.0.12, v5.0.13, v5.0.14, v5.0.15, v5.0.16, v5.0.17, v5.0.18, v5.0.19, v5.0.2, v5.0.20, v5.0.21, v5.0.22, v5.0.23, v5.0.24, v5.0.25, v5.0.26, v5.0.27, v5.0.28, v5.0.29, v5.0.3, v5.0.31, v5.0.32, v5.0.33, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8, v5.0.9].
- Installation request for serverfireteam/blog dev-master -> satisfiable by serverfireteam/blog[master].
[113.9MB/15.48s] Memory usage: 113.9MB (peak: 259.06MB), time: 15.48s
Does anyone know where I've gone wrong?
delete config/excel.php and re-publish it.
php artisan vendor:publish --provider=Maatwebsite\Excel\ExcelServiceProvider
As per your own comment #TimothyBuktu, serverfireteam/blog requires laravel 5.1.
You'll want to lock the version of serverfireteam/blog to dev-master#c0039d3ade67503d674093f3a56d7b1540ae958d in your composer.json, which is the last commit before the requirement of laravel was bumped to 5.1
Alternatively if you still want to receive updates for the package, you'll need to update your application to laravel 5.1. http://laravel.com/docs/5.1/upgrade
mm Xl's answer is excellent!
But after version 3.1 (included), the command is changed to the following one:
php artisan vendor:publish --provider="Maatwebsite\Excel\ExcelServiceProvider" --tag=config
To see this part on docs: https://github.com/Maatwebsite/laravel-excel-docs/blob/develop/3.1/getting-started/installation.md

Resources