Skip to content

Commit 14f9e91

Browse files
authored
Merge pull request #25 from aaemnnosttv/phpunit-polyfills
2 parents b06705d + 0a517d3 commit 14f9e91

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.travis.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ cache:
1616
before_install: composer validate --strict
1717

1818
install:
19-
- composer install
20-
- "[ $TRAVIS_PHP_VERSION != '8.0' ] || composer update phpunit/phpunit --ignore-platform-reqs --with-dependencies"
19+
- "[ $TRAVIS_PHP_VERSION == '8.0' ] || composer install"
20+
# Temporary hack to allow installing PHPUnit 7 with PHP 8 until WP 5.9.
21+
# as WP PHPUnit does not allow PHPUnit higher than 7 yet.
22+
# See https://github.com/WordPress/wordpress-develop/commit/8def694fe4c5df95f8e20e40389faf9cb92b6dca
23+
- "[ $TRAVIS_PHP_VERSION != '8.0' ] || composer install --ignore-platform-reqs"
24+
- composer show
2125

2226
script:
2327
- php -l src/db.php || exit 1

composer.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,16 @@
2929
"phpunit/phpunit": "^5 || ^6 || ^7",
3030
"roots/wordpress": "^5",
3131
"wp-cli/core-command": "^2",
32-
"wp-phpunit/wp-phpunit": "^5"
32+
"wp-phpunit/wp-phpunit": "^5",
33+
"yoast/phpunit-polyfills": "^1.0"
3334
},
3435
"scripts": {
3536
"test": "phpunit"
37+
},
38+
"config": {
39+
"allow-plugins": {
40+
"roots/wordpress-core-installer": true,
41+
"composer/installers": true
42+
}
3643
}
3744
}

0 commit comments

Comments
 (0)