I've been trying to set up my Laravel 8.83.2 project on an Ubuntu 20.04 LTS using PHP version 8.1.3, and no matter what I try I get the following error:
In Container.php line 1089:
Target [Illuminate\Contracts\Bus\Dispatcher] is not instantiable.
This occurs while trying to run any artisan command, no other stacktrace is being outputted either.
This does not seem to be an issue when setting the project up on our alpine CI/CD, any ideas what is causing this? I can provide further information about the project if any is needed.
it seems like a mismatch problem with versions
bootstarp/cache
by handvendor
and install again with a specific PHP version like php8.1 composer install
service php-fpm reload
to avoid hitting opcache (if you are using it in CLI just a ctrl+c
would do the job)