Skip to content

Commit cd05728

Browse files
oliverkleeSam Tuke
authored and
Sam Tuke
committed
[TASK] Test with both latest and oldest dependencies (#241)
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. Fixes #124
1 parent 5fcca66 commit cd05728

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

.travis.yml

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
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:
1413
- secure: GRmIZt08nxg5r3uREPfW2Gz49LIkFVmU/kzSzJ78VISmjuWMUdiZ9GJFmzzvKBxQ0tzUlpvibBu1dvSqOAA4HZ72+p2PvTvezgL8S6dyaJ7bHRlyQlE1SDkK/tctFrIjGdXLAP7vNwqC7ZXtX7iH9Fk3znxy9BnLp4xGZDW54YU=
15-
- PHPLIST_DATABASE_NAME=phplist
16-
- PHPLIST_DATABASE_USER=travis
17-
- PHPLIST_DATABASE_PASSWORD=''
14+
- PHPLIST_DATABASE_NAME=phplist PHPLIST_DATABASE_USER=travis PHPLIST_DATABASE_PASSWORD=''
15+
matrix:
16+
- DEPENDENCIES=latest
17+
- DEPENDENCIES=oldest
1818

1919
notifications:
2020
slack:
@@ -40,7 +40,16 @@ before_install:
4040
mysql ${PHPLIST_DATABASE_NAME} < Database/Schema.sql;
4141
4242
install:
43-
- composer install
43+
- >
44+
echo;
45+
if [ "$DEPENDENCIES" = "latest" ]; then
46+
echo "Installing the latest dependencies";
47+
composer update --with-dependencies --prefer-stable --prefer-dist
48+
else
49+
echo "Installing the lowest dependencies";
50+
composer update --with-dependencies --prefer-stable --prefer-dist --prefer-lowest
51+
fi;
52+
composer show;
4453
4554
script:
4655
- >

composer.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,25 @@
2828

2929
"roave/security-advisories": "dev-master",
3030

31-
"doctrine/orm": "^2.5.6",
32-
"doctrine/doctrine-bundle": "^1.6.0",
33-
"symfony/symfony": "^3.3.2",
31+
"doctrine/orm": "^2.5.0",
32+
"doctrine/common": "^2.6.0",
33+
"doctrine/doctrine-bundle": "^1.8.0",
34+
"symfony/symfony": "^3.3.0",
3435
"symfony/monolog-bundle": "^3.1.0",
3536
"symfony/dependency-injection": "^3.0.0",
3637
"symfony/config": "^3.0.0",
3738
"symfony/yaml": "^3.0.0",
3839
"jms/serializer-bundle": "^2.2",
39-
"sensio/framework-extra-bundle": "^3.0.26",
40-
"sensio/distribution-bundle": "^5.0.0"
40+
"sensio/framework-extra-bundle": "^3.0.0",
41+
"sensio/distribution-bundle": "^5.0.6"
4142
},
4243
"require-dev": {
4344
"phpunit/phpunit": "^6.2.2",
4445
"phpunit/dbunit": "^3.0.0",
45-
"squizlabs/php_codesniffer": "^3.0.1",
46+
"squizlabs/php_codesniffer": "^3.0.0",
4647
"phpstan/phpstan": "^0.7.0",
48+
"nette/caching": "^2.5.0 || ^3.0.0",
49+
"nikic/php-parser": "^3.0.0",
4750
"phpmd/phpmd": "^2.6.0",
4851
"composer/composer": "^1.5.0"
4952
},

0 commit comments

Comments
 (0)