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

@ -66,6 +66,8 @@ jobs:
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
rm -rf ./vendor/phpunit/
composer dump-autoload
fi
- name: Init DB and WP

View File

@ -63,6 +63,8 @@ jobs:
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
rm -rf ./vendor/phpunit/
composer dump-autoload
fi
- name: Init DB and WP