From f90572a5d4b372a88287f21fa32771305e73afb5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 11 May 2022 19:50:40 +0200 Subject: [PATCH] PHP8 --- scripts/_common.sh | 4 ++-- scripts/install | 3 +-- scripts/restore | 16 ++++++++-------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index e07fa79..5f43968 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,11 +4,11 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="8.0" pkg_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-mbstring" -YNH_COMPOSER_VERSION=2.0.14 +YNH_COMPOSER_VERSION=2.3.5 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index e2d78d8..0f30ee8 100644 --- a/scripts/install +++ b/scripts/install @@ -63,7 +63,7 @@ ynh_script_progression --message="Creating a MySQL database..." db_name=$(ynh_sanitize_dbid --db_name=$app) db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name +ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name # Setup a privileged user for phpmyadmin (to prevent using MySQL root user) db_admin_user="${app}_root" @@ -148,7 +148,6 @@ ynh_script_progression --message="Installing dependencies with Composer..." --we ynh_install_composer # Install dependencies -# ynh_exec_warn_less ynh_composer_exec --commands="update --no-dev" ynh_composer_exec --commands="update --no-dev" #================================================= diff --git a/scripts/restore b/scripts/restore index 32c669d..79dc9d3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -90,6 +90,14 @@ fi chown $app: $final_path/tmp +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -101,14 +109,6 @@ ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/fpm/pool.d/$app.conf" # Recreate a dedicated php-fpm config ynh_add_fpm_config -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 - -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies - #================================================= # GENERIC FINALIZATION #=================================================