Skip to content

Commit

Permalink
Use prefer-lowest to test against dependencies.
Browse files Browse the repository at this point in the history
Inspired by http://evertpot.com/testing-composer-prefer-lowest/.

- Update versions of php-vcr that we actually support
- Add Symphony YAML 2.1 explicitly to fix build errors on Travis

Also code formatting.
  • Loading branch information
kasperg committed Aug 5, 2015
1 parent 5af91c3 commit 0ff457b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 4 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ php:
- 5.6

env:
- SYMFONY_VERSION="~2.3"
# Test against previous minor releases of Symfony 2.x to ensure that we
# actually support the versions we specify in our requirements.
- SYMFONY_VERSION="2.3.*"
matrix:
- PREFER_LOWEST="--prefer-lowest"
- PREFER_LOWEST=""

sudo: false

Expand All @@ -19,9 +18,7 @@ before_script:
# rate limits resulting in 502 HTTP responses, build errors and
# Composer\Downloader\TransportException.
# https://github.com/symfony/symfony/issues/4687
- composer install --dev --no-interaction --prefer-source
# Update the Symfony version to test against.
- composer require symfony/options-resolver:${SYMFONY_VERSION}
- composer update --dev --no-interaction --prefer-source $PREFER_LOWEST

script:
- mkdir -p build/logs
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
"require-dev": {
"kasperg/phing-github": "0.2.*",
"phing/phing": "~2.7",
"php-vcr/phpunit-testlistener-vcr": "1.1.*",
"php-vcr/php-vcr": "~1.2",
"php-vcr/phpunit-testlistener-vcr": "~1.1.2",
"phpunit/phpunit": "~4.4",
"psr/log": "~1.0"
"psr/log": "~1.0",
"symfony/yaml": "~2.1"
}
}

0 comments on commit 0ff457b

Please sign in to comment.