It seems that when deploying from Laravel Envoyer we cannot clear-compiled before running composer install/update so Envoyer is loading from packages from cache.
This can obviously be manually fixed by ssh into the release folder and running:
php artisan clear-compiled
composer update
This is a problem most of the times. I encountered this while upgrading: pda/pheanstalk
as envoyer keeps loading the previous version from cache and thus it doesn't work.
At the moment my temporary fix is to run:
cd {{release}}
php artisan clear-compiled
composer update
php artisan optimize
Deployment hook but I can only run this after the initial composer-install hook of envoyer as before that there's no compiled file in the release folder.
This is okay for now but the issue is that my deployment task is running composer install/update twice which is unnecessary overhead.
Is there a better way on how to do this?
My deploy hook: