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:
parent
07cdb5b6a4
commit
0ae984e6cc
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue