Skip to content

Commit b6ba4cf

Browse files
authored
fix php version
1 parent 3b557e4 commit b6ba4cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.travis.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ addons:
3030
services: mongodb
3131

3232
before_script:
33+
- PHP_VERSION=$(php -r 'echo phpversion();')
3334
- mongod --version
34-
- echo ${PHP_VERSION}
35+
- echo $TRAVIS_PHP_VERSION
36+
- echo $PHP_VERSION
3537
- if [[ ${PHP_VERSION:0:2} == "5." ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
3638
- if [[ ${PHP_VERSION:0:2} == "5." ]]; then php -r "echo \MongoClient::VERSION . PHP_EOL;"; fi
3739
- if [[ ${PHP_VERSION:0:2} == "7." ]]; then echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
3840
- if [[ ${PHP_VERSION:0:2} == "7." ]]; then php -r 'echo MONGODB_VERSION . PHP_EOL;'; fi
3941
- composer update --no-interaction
40-
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then composer require "alcaeus/mongo-php-adapter"; fi
42+
- if [[ ${PHP_VERSION:0:2} == "7." ]]; then composer require "alcaeus/mongo-php-adapter"; fi
4143

4244
script:
4345
- echo "Currently not implemented"

0 commit comments

Comments
 (0)