Add support for SAPI setup

This commit is contained in:
Shivam Mathur
2021-03-06 17:40:05 +05:30
parent 7e68292070
commit 6e94dfca93
17 changed files with 495 additions and 28 deletions
+4 -2
View File
@@ -257,9 +257,11 @@ add_composertool() {
fi
}
# Function to get PHP version in semver format.
# Function to get versions of PHP binaries in semver format.
php_semver() {
php"$version" -v | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+" | head -n 1
binary=${1:-"php$version"}
arg=${2:-'-v'}
"$binary" "$arg" | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+" | head -n 1
}
# Function to get the tag for a php version.