Fix unit tests failing in PHP 8 in CI

The problem was that PHP 8 requires setting up a different version of
PHPUnit, and after doing that two versions were in place, one in
'vendor/phpunit' and another one in 'bin/composer/phpunit'; the
autoloader was picking the former but it should pick the later.
This commit is contained in:
Nestor Soriano 2021-08-24 09:39:29 +02:00
parent 07cdb5b6a4
commit 0ae984e6cc
No known key found for this signature in database
GPG Key ID: 08110F3518C12CAD
2 changed files with 6 additions and 2 deletions

View File

@ -65,7 +65,9 @@ jobs:
unzip -d /tmp/phpunit-7.5-fork /tmp/phpunit-7.5-fork.zip
composer bin phpunit config --unset platform
composer bin phpunit config repositories.0 '{"type": "path", "url": "/tmp/phpunit-7.5-fork/phpunit-add-compatibility-with-php8-to-phpunit-7", "options": {"symlink": false}}'
composer bin phpunit require --dev -W phpunit/phpunit:@dev --ignore-platform-reqs
composer bin phpunit require --dev -W phpunit/phpunit:@dev --ignore-platform-reqs
rm -rf ./vendor/phpunit/
composer dump-autoload
fi
- name: Init DB and WP

View File

@ -62,7 +62,9 @@ jobs:
unzip -d /tmp/phpunit-7.5-fork /tmp/phpunit-7.5-fork.zip
composer bin phpunit config --unset platform
composer bin phpunit config repositories.0 '{"type": "path", "url": "/tmp/phpunit-7.5-fork/phpunit-add-compatibility-with-php8-to-phpunit-7", "options": {"symlink": false}}'
composer bin phpunit require --dev -W phpunit/phpunit:@dev --ignore-platform-reqs
composer bin phpunit require --dev -W phpunit/phpunit:@dev --ignore-platform-reqs
rm -rf ./vendor/phpunit/
composer dump-autoload
fi
- name: Init DB and WP