Merge pull request #1945 from shivammathur/shivammathur-php

[Ubuntu] Add php-dev and php-pear
This commit is contained in:
Maxim Lobanov
2020-11-10 15:36:59 +03:00
committed by GitHub
+12 -8
View File
@@ -66,7 +66,6 @@ for version in $php_versions; do
if [[ $version == "5.6" || $version == "7.0" || $version == "7.1" ]]; then if [[ $version == "5.6" || $version == "7.0" || $version == "7.1" ]]; then
apt-fast install -y --no-install-recommends php$version-mcrypt php$version-recode apt-fast install -y --no-install-recommends php$version-mcrypt php$version-recode
apt-get remove --purge -yq php$version-dev
fi fi
if [[ $version == "7.2" || $version == "7.3" ]]; then if [[ $version == "7.2" || $version == "7.3" ]]; then
@@ -81,13 +80,12 @@ apt-fast install -y --no-install-recommends \
php-memcache \ php-memcache \
php-memcached \ php-memcached \
php-mongodb \ php-mongodb \
php-pear \
php-redis \ php-redis \
php-xdebug \ php-xdebug \
php-yaml \ php-yaml \
php-zmq php-zmq
apt-get remove --purge -yq php7.2-dev
apt-fast install -y --no-install-recommends snmp apt-fast install -y --no-install-recommends snmp
# Install composer # Install composer
@@ -113,17 +111,23 @@ mv phpunit /usr/local/bin/phpunit
# Run tests to determine that the software installed as expected # Run tests to determine that the software installed as expected
echo "Testing to make sure that script performed as expected, and basic scenarios work" echo "Testing to make sure that script performed as expected, and basic scenarios work"
for cmd in php $php_versions composer phpunit; do for cmd in composer pear pecl phpunit; do
if [[ $cmd =~ ^[0-9] ]]; then
cmd="php$cmd"
fi
if ! command -v $cmd; then if ! command -v $cmd; then
echo "$cmd was not installed" echo "$cmd was not installed"
exit 1 exit 1
fi fi
done done
for version in $php_versions; do
if ! command -v php$version; then
echo "php$version was not installed"
exit 1
elif ! command -v php-config$version || ! command -v phpize$version; then
echo "php$version-dev was not installed"
exit 1
fi
done
# ubuntu 20.04 libzip-dev is libzip5 based and is not compatible libzip-dev of ppa:ondrej/php # ubuntu 20.04 libzip-dev is libzip5 based and is not compatible libzip-dev of ppa:ondrej/php
# see https://github.com/actions/virtual-environments/issues/1084 # see https://github.com/actions/virtual-environments/issues/1084
if isUbuntu20 ; then if isUbuntu20 ; then