Skip to content

Commit 76346c0

Browse files
anomiexmatticbot
authored andcommitted
Update PHPUnit stubs to PHPUnit 11.5 (#42591)
This needs some changes to the munger: * `@psalm-` annotations seem mostly replaced with `@phpstan-`. * Some bad phpdocs have been fixed. This also calls for some cleanups of things deprecated or removed in PHPUnit 11: * `MockBuilder->addMethods()` is deprecated with no replacement. We often used this to "mock" stdClass; now, instead, we need to either use anonymous classes or mock a dummy interface. * `->getMockForAbstractClass()` is also deprecated. Can be replaced with `->onlyMethods( ... )->getMock()` but we have to manually list the needed methods. * `->getMockForTrait()` as well. Anonymous classes work well here. * `TestCase->returnValue()` is deprecated in favor of `$double->willReturn()`. * `TestCase->addWarning()` is gone. Seems to work replacing it with `trigger_error( E_USER_WARNING )`. * packages/masterbar: `Base_Admin_Menu_Test` has some of the same weirdness `WPcom_Admin_Menu_Test` did before #42504, just less obviously so. * plugins/jetpack: `Jetpack_Client_Server_Test` seems to have been creating unused mocks since #14043. Removed them. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/13956378052 Upstream-Ref: Automattic/jetpack@281a100
1 parent ee22808 commit 76346c0

File tree

4 files changed

+117
-117
lines changed

4 files changed

+117
-117
lines changed

composer.lock

+37-37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jetpack_vendor/i18n-map.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
),
1111
'jetpack-assets' => array(
1212
'path' => 'jetpack_vendor/automattic/jetpack-assets',
13-
'ver' => '4.0.14-alpha1742415897',
13+
'ver' => '4.0.14-alpha1742417137',
1414
),
1515
'jetpack-blaze' => array(
1616
'path' => 'jetpack_vendor/automattic/jetpack-blaze',
@@ -30,7 +30,7 @@
3030
),
3131
'jetpack-connection' => array(
3232
'path' => 'jetpack_vendor/automattic/jetpack-connection',
33-
'ver' => '6.7.7-alpha1742415897',
33+
'ver' => '6.7.7-alpha1742417137',
3434
),
3535
'jetpack-google-analytics' => array(
3636
'path' => 'jetpack_vendor/automattic/jetpack-google-analytics',
@@ -46,7 +46,7 @@
4646
),
4747
'jetpack-masterbar' => array(
4848
'path' => 'jetpack_vendor/automattic/jetpack-masterbar',
49-
'ver' => '0.14.2-alpha1742415897',
49+
'ver' => '0.14.2-alpha1742417137',
5050
),
5151
'jetpack-mu-wpcom' => array(
5252
'path' => 'jetpack_vendor/automattic/jetpack-mu-wpcom',
@@ -62,7 +62,7 @@
6262
),
6363
'jetpack-stats' => array(
6464
'path' => 'jetpack_vendor/automattic/jetpack-stats',
65-
'ver' => '0.15.8-alpha1742415897',
65+
'ver' => '0.15.8-alpha1742417137',
6666
),
6767
'jetpack-stats-admin' => array(
6868
'path' => 'jetpack_vendor/automattic/jetpack-stats-admin',

0 commit comments

Comments
 (0)