Skip to content

Commit d39a98a

Browse files
committed
Improve Travis configuration, add PHP-CS-Fixer and update PHPUnit minimum version
1 parent c76378a commit d39a98a

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
vendor/
22
scratch.php
33
composer.lock
4-
build/
4+
build/
5+
.php_cs.cache

.travis.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
11
language: php
2-
2+
dist: trusty
33
sudo: false
44

5-
php:
6-
- 5.4
7-
- 5.5
8-
- 5.6
9-
- 7.0
10-
- 7.1
11-
- 7.2
12-
- hhvm
13-
145
matrix:
15-
include:
16-
- php: 5.3
17-
dist: precise
18-
fast_finish: true
19-
20-
dist: trusty
6+
include:
7+
- php: 5.3
8+
dist: precise
9+
- php: 5.4
10+
- php: 5.5
11+
- php: 5.6
12+
env: SCRUTINIZER=1
13+
- php: 7.0
14+
env: COMPOSER_FLAGS="--prefer-lowest"
15+
- php: 7.1
16+
env: CS_FIXER=1
17+
- php: 7.2
18+
env: BENCHMARK=1
19+
- php: hhvm
20+
fast_finish: true
2121

2222
cache:
2323
directories:
2424
- $HOME/.composer/cache
2525

26-
notifications:
27-
irc: "irc.freenode.net#masterminds"
28-
2926
before_script:
3027
- composer self-update
31-
- composer install
28+
- composer update $COMPOSER_FLAGS --prefer-dist
3229

3330
script:
31+
- stty cols 120
32+
- if [ "$CS_FIXER" == 1 ]; then wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.13.1/php-cs-fixer.phar && php php-cs-fixer.phar fix . --dry-run --diff --rules="@Symfony"; fi
3433
- mkdir -p build/logs
3534
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
3635

3736
after_script:
38-
- bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.6" ] ; then wget https://scrutinizer-ci.com/ocular.phar; fi;'
39-
- bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.6" ] ; then php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi;'
40-
- php test/benchmark/run.php 10
37+
- if [ "$SCRUTINIZER" == 1 ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi
38+
- if [ "$BENCHMARK" == 1 ]; then php test/benchmark/run.php 10; fi
39+
40+
notifications:
41+
irc: "irc.freenode.net#masterminds"

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
"require-dev": {
2929
"satooshi/php-coveralls": "1.0.*",
30-
"phpunit/phpunit" : "4.*",
30+
"phpunit/phpunit" : "^4.8.35",
3131
"sami/sami": "~2.0"
3232
},
3333
"autoload": {

0 commit comments

Comments
 (0)