Skip to content

Commit 334edd5

Browse files
dbrumannNyholm
authored andcommitted
Update dependency for Symfony 4. (#4)
* Update dependency for Symfony 4. * Add Symfony 4 to travis build matrix. * Add dev flag to Symfony 4 build. * Adding dev-flag should not be necessary as composer.json allows for dev-stability. * Restructure .travis.yml * Add SYMFONY_VERSION to build allowed failed. * Remove unused exclude and refine requirement for 3.x LTS. * Add missing Symfony version. * Separate matrix sections with comments. * Make sure we install sf4
1 parent cf58b1a commit 334edd5

File tree

2 files changed

+24
-14
lines changed

2 files changed

+24
-14
lines changed

.travis.yml

+22-11
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ cache:
66
directories:
77
- $HOME/.composer/cache/files
88

9-
php:
10-
- 5.4
11-
- 5.5
12-
- 5.6
13-
- 7.0
14-
- hhvm
15-
169
env:
1710
global:
1811
- TEST_COMMAND="composer test"
@@ -28,20 +21,38 @@ branches:
2821
matrix:
2922
fast_finish: true
3023
include:
24+
# Test stable versions
3125
- php: 5.4
32-
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.7.*
33-
exclude:
34-
- php: 5.4
35-
env: SYMFONY_VERSION=3.0.*
26+
env: DEPENDENCIES=minimum COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION="2.7.* henrikbjorn/phpspec-code-coverage:^1.0"
27+
- php: 5.5
28+
- php: 5.6
29+
- php: 7.0
30+
31+
# Test latest versions:
32+
- php: 7.1
33+
env: DEPENDENCIES="symfony/lts:^3" SYMFONY_VERSION=3.0.*
34+
- php: 7.1
35+
env: DEPENDENCIES="dev" SYMFONY_VERSION=4.0.*
36+
37+
# Test alternative runtimes:
38+
- php: hhvm
39+
40+
allow_failures:
41+
- php: 7.1
42+
env: DEPENDENCIES="dev" SYMFONY_VERSION=4.0.*
3643

3744
before_install:
3845
- travis_retry composer self-update
46+
- if [ "$DEPENDENCIES" = "minimum" ]; then COMPOSER_FLAGS="--prefer-stable --prefer-lowest"; fi;
47+
- if [ "$DEPENDENCIES" = "dev" ]; then composer config minimum-stability dev; fi;
48+
- if [[ $DEPENDENCIES == *"/"* ]]; then composer require --no-update $DEPENDENCIES; fi;
3949

4050
install:
4151
- travis_retry composer require symfony/symfony:${SYMFONY_VERSION} --no-update
4252
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
4353

4454
script:
55+
- composer validate --strict --no-check-lock
4556
- $TEST_COMMAND
4657

4758
after_success:

composer.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
],
1313
"require": {
1414
"php": ">=5.4",
15-
"symfony/stopwatch": "^2.7|^3.0",
15+
"symfony/stopwatch": "^2.7|^3.0|^4.0",
1616
"php-http/client-common": "^1.1"
1717
},
1818
"require-dev": {
19-
"phpspec/phpspec": "^2.5",
20-
"henrikbjorn/phpspec-code-coverage" : "^1.0"
19+
"phpspec/phpspec": "^2.5 || ^3.0 || ^4.0"
2120
},
2221
"autoload": {
2322
"psr-4": {

0 commit comments

Comments
 (0)