Skip to content

Commit ae48808

Browse files
authored
[TASK] phpstan v2 (#652)
> 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 d288c86 commit ae48808

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,37 @@
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 is_array\(\) with non\-empty\-array will always evaluate to true\.$#'
17+
identifier: function.alreadyNarrowedType
18+
count: 1
19+
path: ../../Classes/Core/Functional/Framework/Constraint/RequestSection/DoesNotHaveRecordConstraint.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/HasRecordConstraint.php
26+
27+
-
28+
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#'
29+
identifier: staticMethod.alreadyNarrowedType
30+
count: 1
31+
path: ../../Classes/Core/Functional/FunctionalTestCase.php
32+
33+
-
34+
message: '#^Strict comparison using \!\=\= between int\|string\|true and false will always evaluate to true\.$#'
35+
identifier: notIdentical.alwaysTrue
36+
count: 1
37+
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.11.5",
64-
"phpstan/phpstan-phpunit": "^1.4.0",
63+
"phpstan/phpstan": "^2.0.2",
64+
"phpstan/phpstan-phpunit": "^2.0.1",
6565
"typo3/cms-workspaces": "13.*.*@dev || 14.*.*@dev"
6666
},
6767
"replace": {

0 commit comments

Comments
 (0)