2121matrix :
2222 include :
2323 - 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"
2725 - php : 7.4
28- env : deps=low
26+ env : deps=high
2927 - php : 8.0
30- services : [memcached]
28+ env : deps=low
3129 fast_finish : true
3230
3331cache :
@@ -71,7 +69,7 @@ before_install:
7169
7270 # tfold is a helper to create folded reports
7371 tfold () {
74- local title="🐘 $PHP $1 $FLIP"
72+ local title="$PHP $1 $FLIP"
7573 local fold=$(echo $title | sed -r 's/[^-_A-Za-z0-9]+/./g')
7674 shift
7775 local id=$(printf %08x $(( RANDOM * RANDOM )))
@@ -183,6 +181,7 @@ install:
183181 git config --global user.name "Symfony"
184182
185183 export SYMFONY_VERSION=$(grep branch-version composer.json | grep -o '[0-9.x]*')
184+ SYMFONY_VERSIONS=$(git ls-remote -q --heads);
186185
187186 if [[ ! $deps ]]; then
188187 php .github/build-packages.php HEAD^ $SYMFONY_VERSION src/Symfony/Bridge/PhpUnit
@@ -202,8 +201,8 @@ install:
202201 - |
203202 # For the feature-branch, when deps=high, the version before it is checked out and tested with the locally patched components
204203 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/.//) &&
207206 git fetch --depth=2 origin $SYMFONY_VERSION &&
208207 git checkout -m FETCH_HEAD &&
209208 export COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
@@ -226,7 +225,7 @@ install:
226225
227226 - |
228227 # 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
230229
231230 if [[ $deps ]]; then mv composer.json.phpunit composer.json; fi
232231
@@ -248,7 +247,7 @@ install:
248247 set -e
249248 export
2352
PHP=$1
250249
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
252251 echo -e "\\n\\e[33;1mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"
253252 return
254253 fi
@@ -262,8 +261,8 @@ install:
262261 (cd src/Symfony/Component/HttpFoundation; mv composer.bak composer.json)
263262 COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
264263
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='^ '
267266 SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
268267 echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
269268 export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
@@ -283,12 +282,12 @@ install:
283282 echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && ([ -e composer.lock ] && ${COMPOSER_UP/update/install} || $COMPOSER_UP --prefer-lowest --prefer-stable) && $PHPUNIT_X'"
284283 echo "$COMPONENTS" | xargs -n1 -I{} tar --append -f ~/php-ext/composer-lowest.lock.tar {}/composer.lock
285284 else
286- if [[ $PHP = 7.4 * ]]; then
285+ if [[ $PHP = 8.0 * ]]; then
287286 # add return types before running the test suite
288287 sed -i 's/"\*\*\/Tests\/"//' composer.json
289288 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
292291 PHPUNIT_X="$PHPUNIT_X,legacy"
293292 fi
294293
0 commit comments