21
21
matrix :
22
22
include :
23
23
- php : 7.2
24
- env : php_extra="7.4"
25
- - php : 7.3
26
- env : deps=high
24
+ env : php_extra="7.3 8.0"
27
25
- php : 7.4
28
- env : deps=low
26
+ env : deps=high
29
27
- php : 8.0
30
- services : [memcached]
28
+ env : deps=low
31
29
fast_finish : true
32
30
33
31
cache :
@@ -71,7 +69,7 @@ before_install:
71
69
72
70
# tfold is a helper to create folded reports
73
71
tfold () {
74
- local title="🐘 $PHP $1 $FLIP"
72
+ local title="$PHP $1 $FLIP"
75
73
local fold=$(echo $title | sed -r 's/[^-_A-Za-z0-9]+/./g')
76
74
shift
77
75
local id=$(printf %08x $(( RANDOM * RANDOM )))
@@ -183,6 +181,7 @@ install:
183
181
git config --global user.name "Symfony"
184
182
185
183
export SYMFONY_VERSION=$(grep branch-version composer.json | grep -o '[0-9.x]*')
184
+ SYMFONY_VERSIONS=$(git ls-remote -q --heads);
186
185
187
186
if [[ ! $deps ]]; then
188
187
php .github/build-packages.php HEAD^ $SYMFONY_VERSION src/Symfony/Bridge/PhpUnit
@@ -202,8 +201,8 @@ install:
202
201
10650
- |
203
202
# For the feature-branch, when deps=high, the version before it is checked out and tested with the locally patched components
204
203
if [[ $deps = high && $TRAVIS_BRANCH = *.x ]]; then
205
- export FLIP='🙃 '
206
- export SYMFONY_VERSION=$(git ls-remote -q --heads | grep -o '/[1-9]\.[0-9].*' | tail -n 1 | sed s/.//) &&
204
+ export FLIP='^ '
205
+ export SYMFONY_VERSION=$(echo "$SYMFONY_VERSIONS" | grep -o '/[1-9]\.[0-9].*' | tail -n 1 | sed s/.//) &&
207
206
git fetch --depth=2 origin $SYMFONY_VERSION &&
208
207
git checkout -m FETCH_HEAD &&
209
208
export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
@@ -226,7 +225,7 @@ install:
226
225
227
226
- |
228
227
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
229
- [[ $deps = high && ${SYMFONY_VERSION%.*} != $(git ls-remote -q --heads | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1 | grep -o '[0-9]*' | head -n 1) ]] && export LEGACY=,legacy
228
+ [[ $deps = high && ${SYMFONY_VERSION%.*} != $(echo "$SYMFONY_VERSIONS" | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1 | grep -o '[0-9]*' | head -n 1) ]] && export LEGACY=,legacy
230
229
231
230
if [[ $deps ]]; then mv composer.json.phpunit composer.json; fi
232
231
@@ -248,7 +247,7 @@ install:
248
247
set -e
249
248
export PHP=$1
250
249
251
- if [[ $PHP != 7.4 * && $PHP != $TRAVIS_PHP_VERSION && $TRAVIS_PULL_REQUEST != false ]]; then
250
+ if [[ $PHP != 8.0 * && $PHP != $TRAVIS_PHP_VERSION && $TRAVIS_PULL_REQUEST != false ]]; then
252
251
echo -e "\\n\\e[33;1mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"
253
252
return
254
253
fi
@@ -262,8 +261,8 @@ install:
262
261
(cd src/Symfony/Component/HttpFoundation; mv composer.bak composer.json)
263
262
COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
264
263
265
- if [[ $COMPONENTS && $LEGACY && ! $TRAVIS_BRANCH = *.x && $TRAVIS_PULL_REQUEST != false ]]; then
266
- export FLIP='🙃 '
264
+ if [[ $COMPONENTS && $LEGACY && ! $TRAVIS_BRANCH = *.x && $TRAVIS_PULL_REQUEST != false && $(echo "$SYMFONY_VERSIONS" | cut -f2 | grep -FA1 /$SYMFONY_VERSION | tail -n 1) = *.x ]]; then
265
+ export FLIP='^ '
267
266
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
268
267
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
269
268
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
@@ -283,12 +282,12 @@ install:
283
282
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && ([ -e composer.lock ] && ${COMPOSER_UP/update/install} || $COMPOSER_UP --prefer-lowest --prefer-stable) && $PHPUNIT_X'"
284
283
echo "$COMPONENTS" | xargs -n1 -I{} tar --append -f ~/php-ext/composer-lowest.lock.tar {}/composer.lock
285
284
else
286
- if [[ $PHP = 7.4 * ]]; then
285
+ if [[ $PHP = 8.0 * ]]; then
287
286
# add return types before running the test suite
288
287
sed -i 's/"\*\*\/Tests\/"//' composer.json
289
288
composer install --optimize-autoloader
290
- SYMFONY_PATCH_TYPE_DECLARATIONS=force=object php .github/patch-types.php
291
- SYMFONY_PATCH_TYPE_DECLARATIONS=force=object php .github/patch-types.php # ensure the script is idempotent
289
+ SYMFONY_PATCH_TYPE_DECLARATIONS=force=1 php .github/patch-types.php
290
+ SYMFONY_PATCH_TYPE_DECLARATIONS=force=1 php .github/patch-types.php # ensure the script is idempotent
292
291
PHPUNIT_X="$PHPUNIT_X,legacy"
293
292
fi
294
293
0 commit comments