Skip to content

Commit

Permalink
Travis fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
frqnck committed May 2, 2017
1 parent 9d2a63f commit 2b073e8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"psr/cache": "1.0.*"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^5.7",
"phpunit/phpunit": "^4.8|^5.3",
"satooshi/php-coveralls": "~0.7.1"
},
"suggest": {
Expand Down
18 changes: 13 additions & 5 deletions tests/bin/travis-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ set -o pipefail

VERSION=`phpenv version-name`

function pecl_install()
{
local _PKG=$1
local _VERSION=$2

pecl shell-test $_PKG || (echo "yes" | pecl install $_PKG-$_VERSION)
}

if [ "${VERSION}" = "hhvm" ]; then
PHPINI=/etc/hhvm/php.ini
else
Expand All @@ -13,14 +21,14 @@ else
pecl channel-update pecl.php.net

# install igbinary
echo "yes" | pecl install igbinary
pecl_install igbinary 2.0.1

# install msgpack
if [ "$(expr "${VERSION}" "<" "7.0")" -eq 1 ]
then
echo "yes" | pecl install -s msgpack-0.5.7
pecl_install msgpack 0.5.7
else
echo "yes" | pecl install -s msgpack-2.0.1
pecl_install msgpack 2.0.2
fi
fi

Expand All @@ -39,9 +47,9 @@ if [ "$DB" = "apc" ]; then
echo "extension = apc.so" >> $PHPINI
elif [ "$(expr "${VERSION}" "<" "7.0")" -eq 1 ]
then
echo "yes" | pecl install -s apcu-4.0.10
pecl_install apcu 4.0.11
else
echo "yes" | pecl install -s apcu-5.1.2
pecl_install apcu 5.1.8
fi
echo "apc.enable_cli = 1" >> $PHPINI
fi
Expand Down

0 comments on commit 2b073e8

Please sign in to comment.