diff --git a/manifest.toml b/manifest.toml index c820d67..493be78 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ description.fr = "Simple phpinfo" version = "1.0~ynh5" -maintainers = ["Maniack Crudelis"] +maintainers = [] [upstream] license = "GPL-3.0-or-later" @@ -42,8 +42,8 @@ ram.runtime = "50M" ask.en = "Choose the version of PHP to use." ask.fr = "Choisissez la version de PHP à utiliser." type = "select" - choices = ["7.4", "8.0", "8.1", "8.2"] - default = "8.2" + choices = ["7.4", "8.0", "8.1", "8.2", "8.3"] + default = "8.3" [resources] [resources.system_user] @@ -54,5 +54,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "php8.2-fpm" - + packages = "nginx" # Kind of "dummy" value to be sure to have a non-empty dep list + packages_from_raw_bash = """ + echo "php${phpversion}-fpm" + """ diff --git a/scripts/install b/scripts/install index 447784c..2f77605 100755 --- a/scripts/install +++ b/scripts/install @@ -27,8 +27,9 @@ chown -R $app:www-data "$install_dir" #================================================= ynh_script_progression --message="Configuring PHP-FPM..." + # Create a dedicated PHP-FPM config -ynh_add_fpm_config +ynh_add_fpm_config --phpversion=$phpversion # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/scripts/upgrade b/scripts/upgrade index dac6b85..26a440f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -36,7 +36,7 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Upgrading PHP-FPM configuration..." # Create a dedicated PHP-FPM config -ynh_add_fpm_config +ynh_add_fpm_config --phpversion=$phpversion # Create a dedicated NGINX config ynh_add_nginx_config diff --git a/tests.toml b/tests.toml index e31077c..7021b53 100644 --- a/tests.toml +++ b/tests.toml @@ -6,8 +6,35 @@ test_format = 1.0 # Tests to run # ------------ - exclude = ["install.private", "change_url"] + exclude = ["change_url"] # ------------------------------- # Default args to use for install # ------------------------------- + + args.phpversion = "8.3" + + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- + +[74_test] + + only = ["install.subdir", "backup_restore", "upgrade" ] + args.phpversion = "7.4" + +[80_test] + + only = ["install.subdir", "backup_restore", "upgrade" ] + args.phpversion = "8.0" + +[81_test] + + only = ["install.subdir", "backup_restore", "upgrade" ] + args.phpversion = "8.1" + + +[82_test] + + only = ["install.subdir", "backup_restore", "upgrade" ] + args.phpversion = "8.2"