Automattic / wordbless

WorDBless allows you to use WordPress core functions in your PHPUnit tests without having to set up a database and the whole WordPress environment
Other
131 stars 6 forks source link

Fix CI #55

Closed leogermani closed 2 years ago

leogermani commented 2 years ago

CI is failing on PHP 8.0 lowest

See https://github.com/Automattic/wordbless/actions/runs/3048662279/jobs/4913959808

Deprecated: PHPUnit\Runner\DefaultTestResultCache implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/runner/work/wordbless/wordbless/vendor/phpunit/phpunit/src/Runner/DefaultTestResultCache.php on line 34
PHPUnit 9.5.0 by Sebastian Bergmann and contributors.

...................................EEEEEEE.                       43 / 43 (100%)

Time: 00:00.879, Memory: 32.00 MB

There were 7 errors:

1) WorDBless\Test_Users::test_add
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:2266
/home/runner/work/wordbless/wordbless/wordpress/wp-content/db.php:26
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1346
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1509
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:640
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1542
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1774
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1397
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1363
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:305
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:331
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/plugin.php:476
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:2465
/home/runner/work/wordbless/wordbless/tests/test-users.php:12

2) WorDBless\Test_Users::test_init_wp_user
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:2266
/home/runner/work/wordbless/wordbless/wordpress/wp-content/db.php:26
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1346
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1509
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:640
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1542
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1774
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1397
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1363
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:305
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:331
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/plugin.php:476
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:2465
/home/runner/work/wordbless/wordbless/tests/test-users.php:25

3) WorDBless\Test_Users::test_update
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:2266
/home/runner/work/wordbless/wordbless/wordpress/wp-content/db.php:26
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1346
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1509
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:640
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1542
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1774
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1397
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1363
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:305
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:331
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/plugin.php:476
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:2465
/home/runner/work/wordbless/wordbless/tests/test-users.php:50

4) WorDBless\Test_Users::test_delete
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:2266
/home/runner/work/wordbless/wordbless/wordpress/wp-content/db.php:26
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1346
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1509
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:640
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1542
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1774
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1397
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1363
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:305
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:331
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/plugin.php:476
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:2465
/home/runner/work/wordbless/wordbless/tests/test-users.php:65

5) WorDBless\Test_Users::test_delete_reassign
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:2266
/home/runner/work/wordbless/wordbless/wordpress/wp-content/db.php:26
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1346
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1509
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:640
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1542
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1774
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1397
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1363
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:305
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:331
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/plugin.php:476
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:2465
/home/runner/work/wordbless/wordbless/tests/test-users.php:97

6) WorDBless\Test_Users::test_capabilities
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:2266
/home/runner/work/wordbless/wordbless/wordpress/wp-content/db.php:26
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1346
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1509
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:640
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1542
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1774
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1397
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1363
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:305
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:331
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/plugin.php:476
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:2465
/home/runner/work/wordbless/wordbless/tests/test-users.php:129

7) WorDBless\Test_Users::test_meta_capabilities
str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:2266
/home/runner/work/wordbless/wordbless/wordpress/wp-content/db.php:26
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1346
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/wp-db.php:1509
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:640
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1542
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/option.php:1774
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1397
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:1363
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:305
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/class-wp-hook.php:331
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/plugin.php:476
/home/runner/work/wordbless/wordbless/wordpress/wp-includes/user.php:2465
/home/runner/work/wordbless/wordbless/tests/test-users.php:150

ERRORS!
Tests: 43, Assertions: 74, Errors: 7.
Error: Process completed with exit code 2.