Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

league/flysystem-aws-s3-v3 on Laravel 8 other packages require lower version

When running composer require league/flysystem-aws-s3-v3 I get:

league/flysystem-aws-s3-v3[2.0.0, ..., 2.x-dev] require league/flysystem ^2.0.0 -> found league/flysystem[2.0.0-alpha.1, ..., 2.x-dev] but the package is fixed to 1.1.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

In my composer.json there is no mention of league/flysystem, but it does appear in my composer.lock as "league/flysystem": "^1.1",. It looks like I have a few packages (like spatie/laravel-backup) that have this as an dependancy.

How do I proceed? I'm not sure how to update a package that other packages have as an dependancy, and that these other packages have also fixed to a specific version.

like image 481
eskimo Avatar asked Nov 25 '20 10:11

eskimo


4 Answers

As you've found already: spatie/laravel-backup is not yet compatible with league/flysystem v2 (which is pretty new, it got released... yesterday!).

Simply require the "old" version of that AWS package through composer require league/flysystem-aws-s3-v3:"^1.0".

After all, this is not a problem of Laravel itself.

like image 74
Nico Haase Avatar answered Mar 08 '23 22:03

Nico Haase


I am using the latest version of laravel V8.4.0 (JULY 2021)

I solve this by:

  1. Deleting composer.lock in the root folder of the project
  2. running composer require league/flysystem-aws-s3-v3:"~1.0"
like image 24
2 revs Avatar answered Mar 08 '23 22:03

2 revs


For Laravel 8 use

composer require --with-all-dependencies league/flysystem-aws-s3-v3 "^1.0"
like image 30
Josh Alecyan Avatar answered Mar 09 '23 00:03

Josh Alecyan


It is a problem with Laravel. Laravel v8 does not support league/flysystem v2 yet. v9 will be shipped with a support for it: https://github.com/laravel/framework/pull/33612

like image 40
mirucon Avatar answered Mar 09 '23 00:03

mirucon