Skip to content

Commit 4b10ae4

Browse files
committed
Use Matrix Exclude instead of hard-coded matrix
While the current .travis.yml setup works, and the reasoning makes sense, it's far less readable than the previous configuration. This suggested patch presents an alternative approach to the same result, which uses the matrix->exclude array to filter out invalid tests, instead of hard-coding every valid combination as the current file does. This seems more readable, at least to me.
1 parent 599dc4c commit 4b10ae4

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.travis.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
language: php
2+
php:
3+
- 5.6
4+
- 7.0
5+
- hhvm
26
matrix:
3-
include:
4-
- php: 5.6
5-
env: ENABLE_REDIS_EXT=0
6-
- php: 5.6
7-
env: ENABLE_REDIS_EXT=1
8-
- php: 7.0
9-
env: ENABLE_REDIS_EXT=0
10-
- php: 7.0
11-
env: ENABLE_REDIS_EXT=1
7+
exclude:
128
- php: hhvm
13-
env: ENABLE_REDIS_EXT=0
9+
env: ENABLE_REDIS_EXT=1
10+
env:
11+
- ENABLE_REDIS_EXT=0
12+
- ENABLE_REDIS_EXT=1
1413
before_script:
1514
- sh -c "if [ $ENABLE_REDIS_EXT -eq 1 ]; then echo \"extension=redis.so\" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi"
1615
- composer install

0 commit comments

Comments
 (0)