mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-09-19 10:41:28 +00:00
Add support for SAPI setup
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user