@@ -101,31 +101,63 @@ You want Travis to run against each currently supported LTS version of Symfony (
101
101
102
102
``` yaml
103
103
language : php
104
+ sudo : false
105
+ cache :
106
+ directories :
107
+ - $HOME/.composer/cache/files
108
+ - $HOME/symfony-bridge/.phpunit
104
109
105
- php :
106
- - 5.5
107
- - 5.6
108
- - 7.0
109
- - 7.1
110
110
env :
111
- global :
112
- - TEST_COMMAND="vendor/bin/phpunit"
113
- matrix :
114
- - SYMFONY_VERSION=4.*
115
- - SYMFONY_VERSION=3.4.*
116
- - SYMFONY_VERSION=2.7.*
111
+ global :
112
+ - PHPUNIT_FLAGS=""
113
+ - SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
117
114
118
115
matrix :
119
- fast_finish : true
120
- include :
121
- - php : 5.5
122
- env : COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_VERSION=2.7.* TEST_COMMAND="vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
116
+ fast_finish : true
117
+ include :
118
+ # Minimum supported dependencies with the latest and oldest PHP version
119
+ - php : 7.2
120
+ env : COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
121
+ - php : 5.5
122
+ env : COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors"
123
+
124
+ # Test the latest stable release
125
+ - php : 5.5
126
+ - php : 5.6
127
+ - php : 7.0
128
+ - php : 7.1
129
+ - php : 7.2
130
+ env : COVERAGE=true PHPUNIT_FLAGS="-v --testsuite main --coverage-text --coverage-clover=build/coverage.xml"
131
+
132
+ - php : 7.1
133
+ env : DEPENDENCIES="dunglas/symfony-lock:^2"
134
+ - php : 7.1
135
+ env : DEPENDENCIES="dunglas/symfony-lock:^3"
136
+ - php : 7.1
137
+ env : DEPENDENCIES="dunglas/symfony-lock:^4"
138
+
139
+ # Latest commit to master
140
+ - php : 7.2
141
+ env : STABILITY="dev"
142
+
143
+ allow_failures :
144
+ # Dev-master is allowed to fail.
145
+ - env : STABILITY="dev"
146
+
147
+ before_install :
148
+ - if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
149
+ - if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
150
+ - composer require --no-update symfony/phpunit-bridge:^4.0 ${DEPENDENCIES}
123
151
124
152
install :
125
- - composer require symfony/symfony:${SYMFONY_VERSION} --no-update
126
- - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
153
+ # To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
154
+ - if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
155
+ - composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
156
+ - ./vendor/bin/simple-phpunit install
127
157
128
158
script :
129
- - $TEST_COMMAND
159
+ - composer validate --strict --no-check-lock
160
+ - ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS
161
+
130
162
```
131
163
0 commit comments