Skip to content

Commit d4878dd

Browse files
authored
Bump dev dependencies, PHPUnit 13 (#737)
1 parent e902c4c commit d4878dd

4 files changed

Lines changed: 22 additions & 9 deletions

File tree

‎composer.json‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
},
99
"require-dev": {
1010
"phpstan/extension-installer": "^1.4",
11-
"phpstan/phpstan": "^2.1.38",
11+
"phpstan/phpstan": "^2.2",
1212
"phpstan/phpstan-deprecation-rules": "^2.0",
1313
"phpstan/phpstan-webmozart-assert": "^2.0",
14-
"phpunit/phpunit": "^12.5",
15-
"rector/jack": "^0.5",
14+
"phpunit/phpunit": "^13.2",
15+
"rector/jack": "^1.0",
1616
"rector/rector-src": "dev-main",
17-
"rector/swiss-knife": "^2.3",
18-
"symplify/easy-coding-standard": "^13.0",
17+
"rector/swiss-knife": "^2.4",
18+
"symplify/easy-coding-standard": "^13.2",
1919
"symplify/phpstan-extensions": "^12.0",
20-
"symplify/phpstan-rules": "^14.9.11",
20+
"symplify/phpstan-rules": "^14.12",
2121
"symplify/vendor-patches": "^11.5",
2222
"tomasvotruba/class-leak": "^2.1",
2323
"tomasvotruba/type-coverage": "^2.3",
2424
"tomasvotruba/unused-public": "^2.2",
25-
"tracy/tracy": "^2.11"
25+
"tracy/tracy": "^2.12"
2626
},
2727
"autoload": {
2828
"psr-4": {

‎rules/CodeQuality/Rector/Class_/TypeWillReturnCallableArrowFunctionRector.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ public function refactor(Node $node): ?Class_
170170

171171
if ($callerType instanceof ObjectType && in_array(
172172
$callerType->getClassName(),
173-
[PHPUnitClassName::INVOCATION_MOCKER, PHPUnitClassName::INVOCATION_STUBBER],
173+
[
174+
PHPUnitClassName::INVOCATION_MOCKER,
175+
PHPUnitClassName::INVOCATION_MOCKER_INTERFACE,
176+
PHPUnitClassName::INVOCATION_STUBBER,
177+
],
174178
true
175179
)) {
176180
$parentMethodCall = $parentMethodCall->var;

‎rules/CodeQuality/Rector/Class_/VoidMethodWithCallbackToWillReturnCallbackRector.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,11 @@ private function isMockedVoidMethodCall(
237237

238238
if ($callerType instanceof ObjectType && in_array(
239239
$callerType->getClassName(),
240-
[PHPUnitClassName::INVOCATION_MOCKER, PHPUnitClassName::INVOCATION_STUBBER],
240+
[
241+
PHPUnitClassName::INVOCATION_MOCKER,
242+
PHPUnitClassName::INVOCATION_MOCKER_INTERFACE,
243+
PHPUnitClassName::INVOCATION_STUBBER,
244+
],
241245
true
242246
)) {
243247
$parentMethodCall = $parentMethodCall->var;

‎src/Enum/PHPUnitClassName.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ final class PHPUnitClassName
1919

2020
public const string INVOCATION_MOCKER = 'PHPUnit\Framework\MockObject\Builder\InvocationMocker';
2121

22+
/**
23+
* PHPUnit 13 moved the interface out of the Builder namespace
24+
*/
25+
public const string INVOCATION_MOCKER_INTERFACE = 'PHPUnit\Framework\MockObject\InvocationMocker';
26+
2227
public const string INVOCATION_STUBBER = 'PHPUnit\Framework\MockObject\InvocationStubber';
2328

2429
public const string TEST_LISTENER = 'PHPUnit\Framework\TestListener';

0 commit comments

Comments
 (0)