Skip to content

Commit b08471a

Browse files
authored
Bump rector/rector and phpstan/phpstan to ^2.0 (#26)
1 parent 2044322 commit b08471a

File tree

3 files changed

+38
-5
lines changed

3 files changed

+38
-5
lines changed

composer.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"require": {
1010
"php": ">=8.3",
11-
"rector/rector": "^1.0",
11+
"rector/rector": "^2.0",
1212
"symfony/config": "^5.4",
1313
"symfony/console": "^5.4",
1414
"symfony/dependency-injection": "^5.4",
@@ -20,9 +20,9 @@
2020
"require-dev": {
2121
"ibexa/code-style": "~2.0.0",
2222
"nikic/php-parser": "^4.18",
23-
"phpstan/phpstan": "^1.10",
24-
"phpstan/phpstan-phpunit": "^1.3",
25-
"phpstan/phpstan-symfony": "^1.3",
23+
"phpstan/phpstan": "^2.0",
24+
"phpstan/phpstan-phpunit": "^2.0",
25+
"phpstan/phpstan-symfony": "^2.0",
2626
"phpunit/phpunit": "^10",
2727
"qossmic/deptrac-shim": "^0.24.0 || ^1.0.2"
2828
},
@@ -34,7 +34,8 @@
3434
},
3535
"autoload-dev": {
3636
"psr-4": {
37-
"Ibexa\\Rector\\Tests\\": "tests/lib/"
37+
"Ibexa\\Rector\\Tests\\": "tests/lib/",
38+
"Ibexa\\Contracts\\Rector\\Tests\\": "tests/contracts/"
3839
}
3940
},
4041
"scripts": {

phpstan-baseline.neon

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^PHPDoc tag @var with type array\<PhpParser\\Node\\Stmt\>\|null is not subtype of native type array\.$#'
5+
identifier: varTag.nativeType
6+
count: 1
7+
path: src/lib/Rule/Internal/RemoveInterfaceWithMethodsRector.php
8+
9+
-
10+
message: '#^Doing instanceof PHPStan\\Type\\ObjectType is error\-prone and deprecated\. Use Type\:\:isObject\(\) or Type\:\:getObjectClassNames\(\) instead\.$#'
11+
identifier: phpstanApi.instanceofType
12+
count: 1
13+
path: src/lib/Rule/PropertyToGetterRector.php
14+
15+
-
16+
message: '#^Doing instanceof PHPStan\\Type\\ObjectType is error\-prone and deprecated\. Use Type\:\:isObject\(\) or Type\:\:getObjectClassNames\(\) instead\.$#'
17+
identifier: phpstanApi.instanceofType
18+
count: 1
19+
path: src/lib/Rule/RemoveArgumentFromMethodCallRector.php
20+
21+
-
22+
message: '#^Method Ibexa\\Rector\\Visitor\\DependentMethodCallRemovingVisitor\:\:leaveNode\(\) never returns array\<PhpParser\\Node\> so it can be removed from the return type\.$#'
23+
identifier: return.unusedType
24+
count: 1
25+
path: src/lib/Visitor/DependentMethodCallRemovingVisitor.php
26+
27+
-
28+
message: '#^Method Ibexa\\Rector\\Visitor\\DependentMethodCallRemovingVisitor\:\:leaveNode\(\) never returns int so it can be removed from the return type\.$#'
29+
identifier: return.unusedType
30+
count: 1
31+
path: src/lib/Visitor/DependentMethodCallRemovingVisitor.php

phpstan.neon

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
includes:
22
- vendor/phpstan/phpstan-phpunit/extension.neon
33
- vendor/phpstan/phpstan-symfony/extension.neon
4+
- phpstan-baseline.neon
45

56
parameters:
67
level: 8

0 commit comments

Comments
 (0)