composer-phplaravel-7packagistilluminate-container

illuminate/bus packages were not loaded, likely because it conflicts with another require


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) 

Solution

  • 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