diff --git a/scripts/upgrade b/scripts/upgrade index c912377..99878f5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,21 +79,27 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" +#================================================= +# PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading Composer..." --weight=1 + +# Upgrade composer itself +ynh_install_composer + #================================================= # INSTALL AND INITIALIZE COMPOSER #================================================= ynh_script_progression --message="Installing Composer..." --weight=10 -# Install Composer -ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--no-dev" - if [ "$upgrade_type" == "UPGRADE_APP" ] then + # install the PHP dependencies using Composer + ynh_exec_warn_less ynh_composer_exec --commands="install --no-dev" + ynh_script_progression --message="Upgrading source files..." --weight=4 pushd $final_path - php$phpversion artisan migrate - php$phpversion artisan cache:clear - php$phpversion artisan view:clear + php$phpversion artisan migrate && php$phpversion artisan cache:clear && php$phpversion artisan view:clear popd fi