Skip to content

Commit 19a4ebd

Browse files
committed
Ensures that packages used under 5.6 can run under 5.6
Install all deps always, but then downgrade if we are running under PHP 5.6.
1 parent 1b87590 commit 19a4ebd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ cache:
99

1010
env:
1111
global:
12-
- COMPOSER_ARGS="--no-interaction --ignore-platform-reqs"
12+
- COMPOSER_ARGS="--no-interaction"
1313
- COVERAGE_DEPS="satooshi/php-coveralls"
14+
- LEGACY_DEPS="phpunit/phpunit doctrine/instantiator"
1415

1516
matrix:
1617
include:
@@ -64,10 +65,11 @@ before_install:
6465
- travis_retry composer self-update
6566

6667
install:
67-
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
68+
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
69+
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
6870
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
6971
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
70-
- travis_retry composer install $COMPOSER_ARGS
72+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
7173
- composer show
7274

7375
script:

0 commit comments

Comments
 (0)