setup-php-cli (spc) is a command line utility to run setup-php.
MIT License
setup-php-cli (SPC) is a command line utility to run setup-php.
Host OS/Virtual environment | PHP Supported |
---|---|
Ubuntu 24.04 |
PHP 5.6 to PHP 8.4
|
Ubuntu 22.04 |
PHP 5.6 to PHP 8.4
|
Ubuntu 20.04 |
PHP 5.6 to PHP 8.4
|
Windows with cygwin |
PHP 5.6 to PHP 8.4
|
macOS Sequoia 15.x |
PHP 5.6 to PHP 8.4
|
macOS Sonoma 14.x |
PHP 5.6 to PHP 8.4
|
macOS Ventura 13.x |
PHP 5.6 to PHP 8.4
|
composer global require shivammathur/spc
sudo cp $(composer global config home)/vendor/bin/spc /usr/local/bin/spc
sudo chmod a+x /usr/local/bin/spc
# Download
curl -o /tmp/spc -sL https://github.com/shivammathur/spc/releases/latest/download/spc
# Verify
curl -o /tmp/spc.asc -sL https://github.com/shivammathur/spc/releases/latest/download/spc.asc
curl -o /tmp/key.asc -sL https://github.com/shivammathur.gpg
gpg --import /tmp/key.asc
gpg --verify /tmp/spc.asc /tmp/spc
# Install
sudo mv /tmp/spc /usr/local/bin/spc
sudo chmod a+x /usr/local/bin/spc
-p "[PHP Version]", --php-version "[PHP Version]" Specify PHP version (Required if PHP is not installed)
-e "[Extensions]", --extensions "[Extensions]" Specify extensions
-b "[INI File]", --ini-file "[INI Values]" Specify base ini file
-i "[INI Values]", --ini-values "[INI Values]" Specify ini values
-c "[Coverage]", --coverage "[Coverage]" Specify Coverage driver
-t "[Tools]", --tools "[Tools]" Specify tools
-f "[Debug]", --debug "[Debug]" Specify debug flag
-f "[Fail Fast]", --fail-fast "[Fail Fast]" Specify fail-fast flag
-z "[PHP TS/NTS]", --phpts "[PHPTS/NTS]" Specify phpts flag
-u "[Update]", --update "[Update]" Specify update flag
-r "[TAG]", --release "[TAG]" Specify release
-v, --verbose Specify verbose mode
-V, --version Show version of script
-h, --help Show help
PHP 7.4
.spc -p "7.4"
intl
and xml
on PHP 7.4
.spc -e "intl, xml"
development
.spc -b "development"
UTC
.spc -i "date.timezone=UTC"
PCOV
.spc -c "pcov"
setup-php
globally.spc -t "phpunit"
spc -p 8.1 -d "true"
spc -t "random_tool" -f "true"
spc -u "true"
Windows
. (Not supported currently)spc -p "7.4" -z "ts"
setup-php
, say to use v1
.spc -r "v1"
spc
in the verbose mode, this will use verbose
branch of setup-php
.spc -v
spc -h
spc
to latest version.spc -U
spc
version.spc -V