Skip to content

Commit c705505

Browse files
Allow custom PHP CLI version
1 parent 3dc8769 commit c705505

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

config/default-config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ general:
146146
# GitHub token to use from composer
147147
#github_token: xxxxxx
148148

149+
# Set the default version of PHP CLI
150+
# php_cli_version: 8.2
151+
149152
# Settings for the vagrant plugins supported by VVV
150153
vagrant-plugins:
151154
disksize: 10GB # requires the disk size vagrant plugin

config/homebin/vvv_restore_php_default

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/usr/bin/env bash
22

3-
DEFAULTPHP="8.2"
3+
# Load config.yml
4+
VVV_CONFIG=/srv/config/default-config.yml
5+
if [[ -f /srv/config/config.yml ]]; then
6+
VVV_CONFIG=/srv/config/config.yml
7+
fi
8+
9+
DEFAULTPHP=$(cat ${VVV_CONFIG} | shyaml -q get-value general.php_cli_version "8.2")
410
php_version=$(readlink -f /usr/bin/php)
511
if [[ $php_version != *"${DEFAULTPHP}"* ]]; then
612
echo " * Restoring the default PHP CLI version ( ${DEFAULTPHP} )"

0 commit comments

Comments
 (0)