diff --git a/config/default-config.yml b/config/default-config.yml index 8eb09085c..971ed8ad0 100644 --- a/config/default-config.yml +++ b/config/default-config.yml @@ -146,6 +146,9 @@ general: # GitHub token to use from composer #github_token: xxxxxx + # Set the default version of PHP CLI + # php_cli_version: 8.2 + # Settings for the vagrant plugins supported by VVV vagrant-plugins: disksize: 10GB # requires the disk size vagrant plugin diff --git a/config/homebin/vvv_restore_php_default b/config/homebin/vvv_restore_php_default index 15aca92bd..452395462 100755 --- a/config/homebin/vvv_restore_php_default +++ b/config/homebin/vvv_restore_php_default @@ -1,6 +1,12 @@ #!/usr/bin/env bash -DEFAULTPHP="8.2" +# Load config.yml +VVV_CONFIG=/srv/config/default-config.yml +if [[ -f /srv/config/config.yml ]]; then + VVV_CONFIG=/srv/config/config.yml +fi + +DEFAULTPHP=$(cat ${VVV_CONFIG} | shyaml -q get-value general.php_cli_version "8.2") php_version=$(readlink -f /usr/bin/php) if [[ $php_version != *"${DEFAULTPHP}"* ]]; then echo " * Restoring the default PHP CLI version ( ${DEFAULTPHP} )"