0

Lavavel & PHP versions:

Laravel: 7
PHP: 7.4.30

I am trying to install pbmedia/laravel-ffmpeg package using composer like so:

composer require pbmedia/laravel-ffmpeg

On the first try the error message was this:

  Problem 1
    - pbmedia/laravel-ffmpeg[7.8.0, ..., 7.x-dev] require league/flysystem ^1.1.4 -> found league/flysystem[1.1.4, ..., 1.x-dev] but the package is fixed to 1.0.69 (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.

So I tried upgrading league/flysystem:

composer update league/flysystem

But after trying to install pbmedia/laravel-ffmpeg the error message changed to this:

  Problem 1
    - pbmedia/laravel-ffmpeg[7.8.0, ..., 7.x-dev] require illuminate/bus ^8.67 -> found illuminate/bus[v8.67.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.

How do I fix this error? I tried installing illuminate/bus:

composer require illuminate/bus ^8.67

But it gave:

Root composer.json requires illuminate/bus ^8.67, found illuminate/bus[v8.67.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.

After running why-not:

% composer why-not illuminate/bus ^8.67

andrey-helldar/laravel-app v1.0.1     requires illuminate/console (^6.0|^7.0)               
andrey-helldar/laravel-app v1.0.1     requires illuminate/filesystem (^6.0|^7.0)            
andrey-helldar/laravel-app v1.0.1     requires illuminate/support (^6.0|^7.0)               
kreait/laravel-firebase    2.2.0      requires illuminate/contracts (^5.8|^6.0|^7.0)        
kreait/laravel-firebase    2.2.0      requires illuminate/support (^5.8|^6.0|^7.0)          
laravel/socialite          v4.4.1     requires illuminate/http (~5.7.0|~5.8.0|^6.0|^7.0)    
laravel/socialite          v4.4.1     requires illuminate/support (~5.7.0|~5.8.0|^6.0|^7.0) 
illuminate/bus             v8.83.24   requires illuminate/contracts (^8.0)                  
herazika/server            dev-master requires laravel/framework (^7.0)                     
illuminate/bus             v8.83.24   requires illuminate/pipeline (^8.0)                   
illuminate/bus             v8.83.24   requires illuminate/support (^8.0) 
The Blind Hawk
  • 1,199
  • 8
  • 24
  • 1
    Installing a specific package version is done by seperating the package name and the version constraint with a `:` or a space. Try using `composer require illuminate/bus ^8.67` – Nico Haase Sep 22 '22 at 12:44

2 Answers2

2

As you can see from the why-not result output, many of the packages you currently use are not ready for Laravel v8, like andrey-helldar/laravel-app (which, in the currently used version v1.0.1, is three years old!) or herazika/server (which isn't even avaliable on Packagist). On the other hand, illuminate/bus ^8.67 explicitly requires Laravel v8

Installing the package using composer require pbmedia/laravel-ffmpeg "7.5.*" could help. That's one of the versions that is still compatible with Laravel v7. Otherwise, try to update your packages first - some of them are way too old to be compatible with any new package you want to use

Nico Haase
  • 11,420
  • 35
  • 43
  • 69
  • Thanks, I managed to install it, but now it gives ```Target class [mail.manager] does not exist.``` when visiting a page. Guess I really need to update the libraries... – The Blind Hawk Sep 27 '22 at 01:53
1

Run the following command to find out why you can not install a certain package:

composer why-not <package> <version>

In your case:

composer why-not illuminate/bus ^8.67
Nicolai Fröhlich
  • 51,330
  • 11
  • 126
  • 130
  • Thanks, I ran it and then checked the output. It seems there are some packages that ```illuminate/bus``` wants version```^8.0 ``` and other want ```^5.8|^6.0|^7.0```. Running composer update would probably solve the issue, I will try it later. – The Blind Hawk Sep 26 '22 at 02:35