Skip to content

Commit cf757e4

Browse files
committed
Improve the Travis setup
1 parent 201fec3 commit cf757e4

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

.travis.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ language: php
44

55
cache:
66
directories:
7-
- $HOME/.composer/cache
7+
- $HOME/.composer/cache/files
88

99
php:
1010
- 5.3
@@ -17,25 +17,26 @@ matrix:
1717
fast_finish: true
1818
include:
1919
- php: 5.3
20-
env: deps="low"
20+
env: COMPOSER_FLAGS="--prefer-lowest" SYMFONY_DEPRECATIONS_HELPER=weak
21+
# Test against Symfony LTS versions
2122
- php: 5.6
22-
env: SYMFONY_VERSION="2.3.x"
23+
env: SYMFONY_VERSION="2.3.*"
2324
- php: 5.6
24-
env: SYMFONY_VERSION="2.6.x"
25+
env: SYMFONY_VERSION="2.7.*"
2526
- php: 5.6
26-
env: SYMFONY_VERSION="2.7.x"
27+
env: SYMFONY_VERSION="2.8.*" DEPENDENCIES=dev
28+
# Test against dev versions
2729
- php: 5.6
28-
env: SYMFONY_VERSION="2.8.x-dev"
29-
- php: 5.6
30-
env: SYMFONY_VERSION="3.0.x-dev"
30+
env: DEPENDENCIES=dev
3131
allow_failures:
32-
- env: SYMFONY_VERSION="3.0.x-dev"
32+
- env: DEPENDENCIES=dev
3333

3434
before_install:
35-
- if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony:"$SYMFONY_VERSION"; fi
3635
- composer self-update
36+
- if [ "$DEPENDENCIES" = "dev" ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi;
37+
- if [ "$SYMFONY_VERSION" != "" ]; then composer require --dev --no-update symfony/symfony:"$SYMFONY_VERSION"; fi
3738

3839
install:
39-
- if [ "$deps" = "low" ]; then composer update --prefer-lowest --prefer-stable; else composer install; fi
40+
- composer update $COMPOSER_FLAGS
4041

41-
script: phpunit --coverage-text
42+
script: phpunit -v --coverage-text

composer.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@
1717
],
1818
"require": {
1919
"php": ">=5.3.2",
20-
"symfony/monolog-bridge": "~2.3|3.*",
21-
"symfony/dependency-injection": "~2.3|3.*",
22-
"symfony/config": "~2.3|3.*",
23-
"symfony/http-kernel": "~2.3|3.*",
20+
"symfony/monolog-bridge": "~2.3|~3.0",
21+
"symfony/dependency-injection": "~2.3|~3.0",
22+
"symfony/config": "~2.3|~3.0",
23+
"symfony/http-kernel": "~2.3|~3.0",
2424
"monolog/monolog": "~1.8"
2525
},
2626
"require-dev": {
27-
"symfony/yaml": "~2.3",
28-
"symfony/console": "~2.3|3.*"
27+
"symfony/yaml": "~2.3|~3.0",
28+
"symfony/console": "~2.3|~3.0"
2929
},
30-
"minimum-stability": "dev",
31-
"prefer-stable": true,
3230
"autoload": {
3331
"psr-4": { "Symfony\\Bundle\\MonologBundle\\": "" }
3432
},

0 commit comments

Comments
 (0)