Skip to content

Commit

Permalink
Merge pull request #6 from supersmile2009/master
Browse files Browse the repository at this point in the history
Allow omnipay/tests v3. Improve travis build matrix.
  • Loading branch information
barryvdh authored Jul 18, 2018
2 parents 7994322 + 6d256ac commit 82d2377
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
31 changes: 27 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
language: php

php:
- 5.6
- 7.0
- 7.1
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- nightly

env:
- COMMON_VERSION="^2.0"
- COMMON_VERSION="^3.0"

matrix:
fast_finish: true
exclude:
- php: '7.2'
env: COMMON_VERSION="^2.0"
- php: nightly
env: COMMON_VERSION="^2.0"
allow_failures:
- php: nightly

install:
- if [ "$COMMON_VERSION" != "" ]; then composer require "omnipay/common:$COMMON_VERSION" "omnipay/tests:$COMMON_VERSION" --no-update; fi;
- if [ "$COMMON_VERSION" == "^2.0" ]; then composer require "squizlabs/php_codesniffer:^1" --no-update; else composer require "squizlabs/php_codesniffer:^3" --no-update; fi;
- composer install -n

before_script:
- composer install -n --dev
# Disable test listener in PHP 5.6, when testing against v3 of omnipay/tests because mockery's v1 listener
# is not compatible with PHPUnit v5.7
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ] && [ "$COMMON_VERSION" == "^3.0" ]; then sed -i '/<listeners>/,/<\/listeners>/d' ./phpunit.xml.dist; fi;

script: vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpunit --coverage-text
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"omnipay/common": "^2.0||^3.0"
},
"require-dev": {
"omnipay/tests": "~2.0"
"omnipay/tests": "^2.0||^3.0"
},
"extra": {
"branch-alias": {
Expand Down

0 comments on commit 82d2377

Please sign in to comment.