From 70b69429271af8ec680d782b43936da335b26450 Mon Sep 17 00:00:00 2001
From: Oliver Klee <typo3-coding@oliverklee.de>
Date: Thu, 9 Mar 2023 18:12:43 +0100
Subject: [PATCH] [TASK] Update to PHPStan 1.10.6

This version removes some false positives from the baseline.

> composer req --dev phpstan/phpstan:^1.10.6
> composer req --dev phpstan/phpstan-phpunit:^1.3.10
> ./Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Resolves: #100133
Releases: main, 11.5
Change-Id: I1120a6b808baff1af8993ca700725b09987e76ac
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78084
Tested-by: Alexander Schnitzler <git@alexanderschnitzler.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Alexander Schnitzler <git@alexanderschnitzler.de>
---
 Build/phpstan/phpstan-baseline.neon | 15 ---------------
 composer.json                       |  4 ++--
 composer.lock                       | 26 +++++++++++++-------------
 3 files changed, 15 insertions(+), 30 deletions(-)

diff --git a/Build/phpstan/phpstan-baseline.neon b/Build/phpstan/phpstan-baseline.neon
index 7c8eb08f4a41..7d830d6ede40 100644
--- a/Build/phpstan/phpstan-baseline.neon
+++ b/Build/phpstan/phpstan-baseline.neon
@@ -585,21 +585,6 @@ parameters:
 			count: 1
 			path: ../../typo3/sysext/core/Classes/Database/Schema/DefaultTcaSchema.php
 
-		-
-			message: "#^Conditional return type uses subject type T which is not part of PHPDoc @template tags\\.$#"
-			count: 1
-			path: ../../typo3/sysext/core/Classes/Database/Schema/Types/DateTimeType.php
-
-		-
-			message: "#^Conditional return type uses subject type T which is not part of PHPDoc @template tags\\.$#"
-			count: 1
-			path: ../../typo3/sysext/core/Classes/Database/Schema/Types/DateType.php
-
-		-
-			message: "#^Conditional return type uses subject type T which is not part of PHPDoc @template tags\\.$#"
-			count: 1
-			path: ../../typo3/sysext/core/Classes/Database/Schema/Types/TimeType.php
-
 		-
 			message: "#^Call to an undefined method TYPO3\\\\CMS\\\\Core\\\\Package\\\\PackageInterface\\:\\:getServiceProvider\\(\\)\\.$#"
 			count: 1
diff --git a/composer.json b/composer.json
index 343fcbc2cbec..fac25fee7643 100644
--- a/composer.json
+++ b/composer.json
@@ -113,8 +113,8 @@
 		"friendsofphp/php-cs-fixer": "^3.14.4",
 		"friendsoftypo3/phpstan-typo3": "^0.9.0",
 		"php-webdriver/webdriver": "^1.13.0",
-		"phpstan/phpstan": "^1.10.1",
-		"phpstan/phpstan-phpunit": "^1.3.7",
+		"phpstan/phpstan": "^1.10.6",
+		"phpstan/phpstan-phpunit": "^1.3.10",
 		"phpunit/phpunit": "^9.6.1",
 		"sokil/php-isocodes-db-i18n": "^4.0",
 		"symfony/translation": "^6.2",
diff --git a/composer.lock b/composer.lock
index ab50698b0866..76fa56fa906a 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "bef0c8139d7d1014d14fb9318a74728e",
+    "content-hash": "cd572d1093d48d6a5ce9aa9e92beb2ae",
     "packages": [
         {
             "name": "bacon/bacon-qr-code",
@@ -6542,16 +6542,16 @@
         },
         {
             "name": "phpstan/phpstan",
-            "version": "1.10.1",
+            "version": "1.10.6",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpstan/phpstan.git",
-                "reference": "1cd5fc530a8b68702f3733ad64294b2a39564198"
+                "reference": "50d089a3e0904b0fe7e2cf2d4fd37d427d64235a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1cd5fc530a8b68702f3733ad64294b2a39564198",
-                "reference": "1cd5fc530a8b68702f3733ad64294b2a39564198",
+                "url": "https://api.github.com/repos/phpstan/phpstan/zipball/50d089a3e0904b0fe7e2cf2d4fd37d427d64235a",
+                "reference": "50d089a3e0904b0fe7e2cf2d4fd37d427d64235a",
                 "shasum": ""
             },
             "require": {
@@ -6581,7 +6581,7 @@
             ],
             "support": {
                 "issues": "https://github.com/phpstan/phpstan/issues",
-                "source": "https://github.com/phpstan/phpstan/tree/1.10.1"
+                "source": "https://github.com/phpstan/phpstan/tree/1.10.6"
             },
             "funding": [
                 {
@@ -6597,20 +6597,20 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-02-21T21:57:23+00:00"
+            "time": "2023-03-09T16:55:12+00:00"
         },
         {
             "name": "phpstan/phpstan-phpunit",
-            "version": "1.3.7",
+            "version": "1.3.10",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpstan/phpstan-phpunit.git",
-                "reference": "7e43c8f77c7e419730ead01c8dc787c6bcbe0e15"
+                "reference": "4cc5c6cc38e56bce7ea47c4091814e516d172dc3"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/7e43c8f77c7e419730ead01c8dc787c6bcbe0e15",
-                "reference": "7e43c8f77c7e419730ead01c8dc787c6bcbe0e15",
+                "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/4cc5c6cc38e56bce7ea47c4091814e516d172dc3",
+                "reference": "4cc5c6cc38e56bce7ea47c4091814e516d172dc3",
                 "shasum": ""
             },
             "require": {
@@ -6647,9 +6647,9 @@
             "description": "PHPUnit extensions and rules for PHPStan",
             "support": {
                 "issues": "https://github.com/phpstan/phpstan-phpunit/issues",
-                "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.7"
+                "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.10"
             },
-            "time": "2023-02-21T18:40:15+00:00"
+            "time": "2023-03-02T10:25:13+00:00"
         },
         {
             "name": "phpunit/php-code-coverage",
-- 
GitLab