Skip to content

Commit

Permalink
Allow custom PHP CLI version
Browse files Browse the repository at this point in the history
  • Loading branch information
pentatonicfunk committed Oct 20, 2024
1 parent 3dc8769 commit c705505
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config/default-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 7 additions & 1 deletion config/homebin/vvv_restore_php_default
Original file line number Diff line number Diff line change
@@ -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} )"
Expand Down

0 comments on commit c705505

Please sign in to comment.