Skip to content

Commit acc8171

Browse files
committed
Update .travis.yml and travis-init.sh for PHP 7
- there is no `hhvm-nightly` anymore on travis travis-ci/travis-ci#3788 (comment) - add php 7 - `event` extension works - `libev` does not support PHP 7 (yet?) m4rw3r/php-libev#8 - `libevent` also does not support PHP 7 https://pecl.php.net/package/libevent
1 parent ddfadd9 commit acc8171

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ php:
44
- 5.4
55
- 5.5
66
- 5.6
7+
- 7.0
78
- hhvm
8-
- hhvm-nightly
99

1010
matrix:
1111
allow_failures:
1212
- php: hhvm
13-
- php: hhvm-nightly
1413
fast_finish: true
1514

1615
install: ./travis-init.sh

travis-init.sh

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,29 @@ if [[ "$TRAVIS_PHP_VERSION" != "hhvm" &&
1111
# install 'event' PHP extension
1212
echo "yes" | pecl install event
1313

14-
# install 'libevent' PHP extension
15-
curl http://pecl.php.net/get/libevent-0.1.0.tgz | tar -xz
16-
pushd libevent-0.1.0
17-
phpize
18-
./configure
19-
make
20-
make install
21-
popd
22-
echo "extension=libevent.so" >> "$(php -r 'echo php_ini_loaded_file();')"
14+
# install 'libevent' PHP extension (does not support php 7)
15+
if [[ "$TRAVIS_PHP_VERSION" != "7.0" ]]; then
16+
curl http://pecl.php.net/get/libevent-0.1.0.tgz | tar -xz
17+
pushd libevent-0.1.0
18+
phpize
19+
./configure
20+
make
21+
make install
22+
popd
23+
echo "extension=libevent.so" >> "$(php -r 'echo php_ini_loaded_file();')"
24+
fi
2325

24-
# install 'libev' PHP extension
25-
git clone --recursive https://github.com/m4rw3r/php-libev
26-
pushd php-libev
27-
phpize
28-
./configure --with-libev
29-
make
30-
make install
31-
popd
32-
echo "extension=libev.so" >> "$(php -r 'echo php_ini_loaded_file();')"
26+
# install 'libev' PHP extension (does not support php 7)
27+
if [[ "$TRAVIS_PHP_VERSION" != "7.0" ]]; then
28+
git clone --recursive https://github.com/m4rw3r/php-libev
29+
pushd php-libev
30+
phpize
31+
./configure --with-libev
32+
make
33+
make install
34+
popd
35+
echo "extension=libev.so" >> "$(php -r 'echo php_ini_loaded_file();')"
36+
fi
3337

3438
fi
3539

0 commit comments

Comments
 (0)