Skip to content

Commit

Permalink
[TASK] Raise phpstan/phpstan and friends
Browse files Browse the repository at this point in the history
This change raises phpstan and related
package to the latest version. Baseline
is recreated to remove no longer matched
error ignore pattern.

Used command(s):

> composer require --dev \
    "phpstan/phpstan":"^1.10.20" \
    "phpstan/phpstan-phpunit":"^1.3.13"

> Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Resolves: #101132
Releases: main, 12.4, 11.5
Change-Id: I8db8ec14028efad25379ecc5561445fccf4aca3a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79469
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Thomas Hohn <tho@gyldendal.dk>
  • Loading branch information
sbuerk authored and maddy2101 committed Jun 21, 2023
1 parent 01739e3 commit d75deb0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
15 changes: 10 additions & 5 deletions Build/phpstan/phpstan-baseline.neon
Expand Up @@ -1640,11 +1640,6 @@ parameters:
count: 1
path: ../../typo3/sysext/core/Classes/Type/Enumeration.php

-
message: "#^Method TYPO3\\\\CMS\\\\Core\\\\Type\\\\Enumeration\\:\\:cast\\(\\) should return static\\(TYPO3\\\\CMS\\\\Core\\\\Type\\\\Enumeration\\) but returns object\\.$#"
count: 1
path: ../../typo3/sysext/core/Classes/Type/Enumeration.php

-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -2715,6 +2710,11 @@ parameters:
count: 1
path: ../../typo3/sysext/extbase/Classes/Service/CacheService.php

-
message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#"
count: 1
path: ../../typo3/sysext/extbase/Classes/Service/ImageService.php

-
message: "#^Parameter \\#1 \\$uid of method TYPO3\\\\CMS\\\\Core\\\\Resource\\\\ResourceFactory\\:\\:getFileObject\\(\\) expects int, \\(string\\|false\\) given\\.$#"
count: 1
Expand Down Expand Up @@ -4560,6 +4560,11 @@ parameters:
count: 1
path: ../../typo3/sysext/frontend/Tests/Unit/ContentObject/Menu/AbstractMenuContentObjectTest.php

-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with class\\-string\\<static\\(TYPO3\\\\CMS\\\\Frontend\\\\Tests\\\\Unit\\\\ContentObject\\\\Menu\\\\MenuContentObjectFactoryTest\\)\\> and TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\Menu\\\\AbstractMenuContentObject will always evaluate to false\\.$#"
count: 2
path: ../../typo3/sysext/frontend/Tests/Unit/ContentObject/Menu/MenuContentObjectFactoryTest.php

-
message: "#^Parameter \\#1 \\$type of method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\Menu\\\\MenuContentObjectFactory\\:\\:registerMenuType\\(\\) expects string, array given\\.$#"
count: 1
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -119,8 +119,8 @@
"php-webdriver/webdriver": "^1.12.0",
"phpspec/prophecy": "^1.15.0",
"phpspec/prophecy-phpunit": "^2.0.1",
"phpstan/phpstan": "^1.10.15",
"phpstan/phpstan-phpunit": "^1.3.11",
"phpstan/phpstan": "^1.10.20",
"phpstan/phpstan-phpunit": "^1.3.13",
"phpunit/phpunit": "^9.6.1",
"typo3/cms-styleguide": "~11.5.4",
"typo3/testing-framework": "^6.16.7",
Expand Down
24 changes: 12 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d75deb0

Please sign in to comment.