diff --git a/scripts/_common.sh b/scripts/_common.sh index 1cb5feb..ae6eb5a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,6 +8,12 @@ YNH_COMPOSER_VERSION="2.7.7" wb_conf="$install_dir/app/config/parameters.yml" +# Define a function to execute commands with `php_exec` +php_exec() { + (cd "$install_dir" && ynh_exec_as "$app" \ + php${phpversion} "$install_dir/bin/console" --no-interaction --env=prod "$@") +} + #================================================= # PERSONAL HELPERS #=================================================