Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5 - Stuck between artisan clear-compiled and composer update

I pulled changes from origin and it seems some provider from a new dependency was added to config/app.php. I know I'm supposed to run composer update in order to pull that dependency but since Laravel's default composer.json file appends php artisan clear-compiled beforehand, I can't really update cause clear-compiled is crashing due to the non-existing dependency.

What's the right way of fixing this? I know I could just delete the whole vendor/ or quickly comment/uncomment the missing provider, but that seems more than a hackz rather than an actual procedure. Maybe the whole incident shouldn't have occurred at all and we should improve our git usage.

like image 367
Christopher Francisco Avatar asked Sep 05 '25 18:09

Christopher Francisco


1 Answers

You can do composer update --no-scripts to prevent running clear-compiled artisan command before update. I usually run above and then php artisan optimize --force when I delete a package.

like image 146
hassansin Avatar answered Sep 08 '25 23:09

hassansin