**List of steps to reproduce** (step by step, including full links if applicable):
* Submit a patch in IPInfo * `php phpunit.php ../../extension, eg. https://gerrit.wikimedia.org/r/c/mediawiki/extens/IPInfo/tests/phpunit/unit/Rest/Handler/Revisions/IPInfo/+/801838/HandlerTest.php`
* Enjoy your -1 by jenkins-bot
**What happens?**:
The return declaration of `userHasRight` has been changed to bool recently in [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/5905854ab1fa82202e318258f476924ecc0912f2^!/includes/Permissions/PermissionManager.php | this patch ]], but the unit tests in `tests/phpunit/unit/Rest/Handler/RevisionHandlerTest.php` of IPInfo extension has not been updated yet:warnings
```
$permissionManager->method( 'userHasRight'There were 2 warnings:
1) MediaWiki\IPInfo\Test\Unit\Rest\Handler\RevisionHandlerTest::testExecuteErrors with data set "Access denied, registered" (array(true), array('ipinfo-rest-access-denied', 403))
->willReturn( $options['userHasRight'] ??Method userHasRight may not return value of type NULL, its return declaration is ": bool"
2) MediaWiki\IPInfo\Test\Unit\Rest\Handler\RevisionHandlerTest::testExecuteErrors with data set "Access denied, null ); // hereanon" (array(false), array('ipinfo-rest-access-denied', should assume false rather than null401))
```Method userHasRight may not return value of type NULL, its return declaration is ": bool"
WARNINGS!
Thus the following unit test wTests: 9, Assertions: 42, Warnings: 2.
```
**What happens?**:
12:33:20 There were 2 warnings:
12:33:20
12:33:20 1) MediaWiki\IPInfo\Test\Unit\Rest\Handler\RevisionHandlerTest::testExecuteErrors with data set "Access denied, registered" (array(true), array('ipinfo-rest-access-denied', 403))
12:33:20 Method userHasRight may not return value of type NULLThe return declaration of `userHasRight` and `userCan` has been changed to bool recently in [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/5905854ab1fa82202e318258f476924ecc0912f2^!/includes/Permissions/PermissionManager.php | this patch ]], its return declaration is ": bool"
12:33:20
12:33:20 phpvfscomposer:///workspace/src/vendor/phpunit/phpunit/phpunit:97but the unit tests in `tests/phpunit/unit/Rest/Handler/RevisionHandlerTest.php` of IPInfo extension has not been updated yet:
12:33:20
12:33:20 2) MediaWiki\IPInfo\Test\Unit\Rest\Handler\RevisionHandlerTest::testExecuteErrors with data set "Access denied, anon" (array(false), array('ipinfo-rest-access-denied', 401))```
12:33:20 Method userHasRight may not return value of type NULL, its return declaration is ": bool"$permissionManager->method( 'userHasRight' )
12:33:20
12:33:20 phpvfscomposer:///workspace/src/vendor/phpunit/phpunit/phpunit:97 ->willReturn( $options['userHasRight'] ?? null ); // here, should assume false rather than null; the same for userCan
```
**What should have happened instead?**:
No warnings :)
**Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.**: master