Skip to content

Commit c1f9fa8

Browse files
author
Felix Arntz
committed
Make composer setup on Travis work on PHP 5.2.
1 parent e8a9a01 commit c1f9fa8

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.travis.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,26 @@ before_script:
5252
case "$TRAVIS_PHP_VERSION" in
5353
5.6|5.5|5.4|5.3)
5454
composer global require "phpunit/phpunit:^4"
55-
composer install
5655
;;
5756
5.2)
5857
;;
5958
*)
6059
composer global require "phpunit/phpunit:^6"
61-
composer install
6260
;;
6361
esac
64-
- cd php52
65-
- composer install
66-
- cd ..
62+
- |
63+
if [[ "$TRAVIS_PHP_VERSION" == "5.2" ]]; then
64+
phpenv global 5.3
65+
cd php52
66+
composer install
67+
cd ..
68+
phpenv global "$TRAVIS_PHP_VERSION"
69+
else
70+
composer install
71+
cd php52
72+
composer install
73+
cd ..
74+
fi
6775
- PLUGIN_SLUG=$(basename $(pwd))
6876
- export WP_DEVELOP_DIR=/tmp/wordpress/
6977
- git clone --depth=50 --branch="$WP_VERSION" git://develop.git.wordpress.org/ /tmp/wordpress

0 commit comments

Comments
 (0)