Skip to content

Commit ff70168

Browse files
authored
[TASK] phpstan v2 (#651)
> composer req --dev phpstan/phpstan:^2.0.2 phpstan/phpstan-phpunit:^2.0.1 > Build/Scripts/runTests.sh -s phpstanGenerateBaseline -p 8.2 Releases: main, 8
1 parent ee19235 commit ff70168

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,49 @@
11
parameters:
22
ignoreErrors:
3+
-
4+
message: '#^Offset 0 on non\-empty\-list\<string\> on left side of \?\? always exists and is not nullable\.$#'
5+
identifier: nullCoalesce.offset
6+
count: 1
7+
path: ../../Classes/Composer/ComposerPackageManager.php
8+
9+
-
10+
message: '#^Trait TYPO3\\TestingFramework\\Core\\AccessibleProxyTrait is used zero times and is not analysed\.$#'
11+
identifier: trait.unused
12+
count: 1
13+
path: ../../Classes/Core/AccessibleProxyTrait.php
14+
15+
-
16+
message: '#^Call to function method_exists\(\) with ''PHPUnit\\\\Metadata\\\\MetadataCollection'' and ''isWithoutErrorHandl…'' will always evaluate to true\.$#'
17+
identifier: function.alreadyNarrowedType
18+
count: 1
19+
path: ../../Classes/Core/BaseTestCase.php
20+
21+
-
22+
message: '#^Call to function is_array\(\) with non\-empty\-array will always evaluate to true\.$#'
23+
identifier: function.alreadyNarrowedType
24+
count: 1
25+
path: ../../Classes/Core/Functional/Framework/Constraint/RequestSection/DoesNotHaveRecordConstraint.php
26+
27+
-
28+
message: '#^Call to function is_array\(\) with non\-empty\-array will always evaluate to true\.$#'
29+
identifier: function.alreadyNarrowedType
30+
count: 1
31+
path: ../../Classes/Core/Functional/Framework/Constraint/RequestSection/HasRecordConstraint.php
32+
33+
-
34+
message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#'
35+
identifier: function.alreadyNarrowedType
36+
count: 1
37+
path: ../../Classes/Core/Functional/Framework/DataHandling/Snapshot/DatabaseSnapshot.php
38+
39+
-
40+
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
41+
identifier: staticMethod.alreadyNarrowedType
42+
count: 1
43+
path: ../../Classes/Core/Functional/FunctionalTestCase.php
44+
45+
-
46+
message: '#^Strict comparison using \!\=\= between int\|string\|true and false will always evaluate to true\.$#'
47+
identifier: notIdentical.alwaysTrue
48+
count: 1
49+
path: ../../Classes/Core/Functional/FunctionalTestCase.php

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
},
6161
"require-dev": {
6262
"friendsofphp/php-cs-fixer": "^3.65.0",
63-
"phpstan/phpstan": "^1.9.2",
64-
"phpstan/phpstan-phpunit": "^1.1.1",
63+
"phpstan/phpstan": "^2.0.2",
64+
"phpstan/phpstan-phpunit": "^2.0.1",
6565
"typo3/cms-workspaces": "12.*.*@dev || 13.*.*@dev"
6666
},
6767
"replace": {

0 commit comments

Comments
 (0)