Skip to content

Commit 22542ef

Browse files
oliverkleeSam Tuke
authored andcommitted
[TASK] Test with both latest and oldest dependencies (#39)
This ensures that our dependency versions given in the composer.json always provide a working set of packages. Also make the dependencies more lenient and provide explicit minimal versions for some indirect dependencies.
1 parent 4a4f1e6 commit 22542ef

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

.travis.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
language: php
22

3-
matrix:
4-
include:
5-
- php: 7.0
6-
- php: 7.1
7-
- php: 7.2
3+
php:
4+
- 7.0
5+
- 7.1
6+
- 7.2
87

98
services:
109
- mysql
1110

1211
env:
1312
global:
14-
- PHPLIST_DATABASE_NAME=phplist
15-
- PHPLIST_DATABASE_USER=travis
16-
- PHPLIST_DATABASE_PASSWORD=''
13+
- PHPLIST_DATABASE_NAME=phplist PHPLIST_DATABASE_USER=travis PHPLIST_DATABASE_PASSWORD=''
14+
matrix:
15+
- DEPENDENCIES=latest
16+
- DEPENDENCIES=oldest
1717

1818
notifications:
1919
slack:
@@ -33,7 +33,16 @@ before_install:
3333
- phpenv config-rm xdebug.ini
3434

3535
install:
36-
- composer install
36+
- >
37+
echo;
38+
if [ "$DEPENDENCIES" = "latest" ]; then
39+
echo "Installing the latest dependencies";
40+
composer update --with-dependencies --prefer-stable --prefer-dist
41+
else
42+
echo "Installing the lowest dependencies";
43+
composer update --with-dependencies --prefer-stable --prefer-dist --prefer-lowest
44+
fi;
45+
composer show;
3746
3847
before_script:
3948
- >

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
},
3333
"require-dev": {
3434
"phpunit/phpunit": "^6.2.2",
35-
"squizlabs/php_codesniffer": "^3.0.1",
35+
"squizlabs/php_codesniffer": "^3.0.0",
3636
"phpstan/phpstan": "^0.7.0",
37+
"nette/caching": "^2.5.0 || ^3.0.0",
38+
"nikic/php-parser": "^3.0.0",
3739
"phpmd/phpmd": "^2.6.0"
3840
},
3941
"autoload": {

0 commit comments

Comments
 (0)