From d32b7e0e3b1af51dabe1068df9052b57e26bc664 Mon Sep 17 00:00:00 2001
From: Benni Mack <benni@typo3.org>
Date: Mon, 28 Jun 2021 09:19:15 +0200
Subject: [PATCH] [TASK] Require doctrine/dbal 2.13

In order to make TYPO3 Core compatible with doctrine/dbal 3.0,
Core now requires doctrine/dbal 2.13 to allow to track all deprecations
and use the forward-facing APIs.

Used composer commands:
* composer req doctrine/dbal:^2.13
* composer req doctrine/dbal:^2.13 -d typo3/sysext/core --no-update
* composer req doctrine/dbal:^2.13 -d typo3/sysext/install --no-update
* composer req doctrine/dbal:^2.13 -d typo3/sysext/redirects --no-update

Resolves: #94423
Releases: master
Change-Id: Ifede8ebdac0b47a0db0ba5d304878c91c3579f58
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69632
Tested-by: core-ci <typo3@b13.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
---
 composer.json                        |  2 +-
 composer.lock                        | 80 +++++++++++++++++++++-------
 phpstan.neon                         |  4 --
 typo3/sysext/core/composer.json      |  2 +-
 typo3/sysext/install/composer.json   |  2 +-
 typo3/sysext/redirects/composer.json |  2 +-
 6 files changed, 64 insertions(+), 28 deletions(-)

diff --git a/composer.json b/composer.json
index c44125895d07..f7b58c96a098 100644
--- a/composer.json
+++ b/composer.json
@@ -42,7 +42,7 @@
 		"christian-riesen/base32": "^1.5",
 		"cogpowered/finediff": "~0.3.1",
 		"doctrine/annotations": "^1.11",
-		"doctrine/dbal": "^2.12",
+		"doctrine/dbal": "^2.13",
 		"doctrine/instantiator": "^1.4",
 		"doctrine/lexer": "^1.2.1",
 		"egulias/email-validator": "^2.1",
diff --git a/composer.lock b/composer.lock
index a8fc3e545fcb..c8f709082f2b 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": "1cf723e7cb304cb1d36ff6dcd8c9edcf",
+    "content-hash": "482b0db74ad004eb66ad67a46fac90ac",
     "packages": [
         {
             "name": "bacon/bacon-qr-code",
@@ -371,32 +371,34 @@
         },
         {
             "name": "doctrine/dbal",
-            "version": "2.12.1",
+            "version": "2.13.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/dbal.git",
-                "reference": "adce7a954a1c2f14f85e94aed90c8489af204086"
+                "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/dbal/zipball/adce7a954a1c2f14f85e94aed90c8489af204086",
-                "reference": "adce7a954a1c2f14f85e94aed90c8489af204086",
+                "url": "https://api.github.com/repos/doctrine/dbal/zipball/8dd39d2ead4409ce652fd4f02621060f009ea5e4",
+                "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4",
                 "shasum": ""
             },
             "require": {
-                "doctrine/cache": "^1.0",
+                "doctrine/cache": "^1.0|^2.0",
+                "doctrine/deprecations": "^0.5.3",
                 "doctrine/event-manager": "^1.0",
                 "ext-pdo": "*",
-                "php": "^7.3 || ^8"
+                "php": "^7.1 || ^8"
             },
             "require-dev": {
-                "doctrine/coding-standard": "^8.1",
-                "jetbrains/phpstorm-stubs": "^2019.1",
-                "phpstan/phpstan": "^0.12.40",
-                "phpunit/phpunit": "^9.4",
-                "psalm/plugin-phpunit": "^0.10.0",
+                "doctrine/coding-standard": "9.0.0",
+                "jetbrains/phpstorm-stubs": "2020.2",
+                "phpstan/phpstan": "0.12.81",
+                "phpunit/phpunit": "^7.5.20|^8.5|9.5.5",
+                "squizlabs/php_codesniffer": "3.6.0",
+                "symfony/cache": "^4.4",
                 "symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
-                "vimeo/psalm": "^3.17.2"
+                "vimeo/psalm": "4.6.4"
             },
             "suggest": {
                 "symfony/console": "For helpful console commands such as SQL execution and import of files."
@@ -405,11 +407,6 @@
                 "bin/doctrine-dbal"
             ],
             "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "4.0.x-dev"
-                }
-            },
             "autoload": {
                 "psr-4": {
                     "Doctrine\\DBAL\\": "lib/Doctrine/DBAL"
@@ -462,7 +459,7 @@
             ],
             "support": {
                 "issues": "https://github.com/doctrine/dbal/issues",
-                "source": "https://github.com/doctrine/dbal/tree/2.12.1"
+                "source": "https://github.com/doctrine/dbal/tree/2.13.2"
             },
             "funding": [
                 {
@@ -478,7 +475,50 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-11-14T20:26:58+00:00"
+            "time": "2021-06-18T21:48:39+00:00"
+        },
+        {
+            "name": "doctrine/deprecations",
+            "version": "v0.5.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/doctrine/deprecations.git",
+                "reference": "9504165960a1f83cc1480e2be1dd0a0478561314"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/doctrine/deprecations/zipball/9504165960a1f83cc1480e2be1dd0a0478561314",
+                "reference": "9504165960a1f83cc1480e2be1dd0a0478561314",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1|^8.0"
+            },
+            "require-dev": {
+                "doctrine/coding-standard": "^6.0|^7.0|^8.0",
+                "phpunit/phpunit": "^7.0|^8.0|^9.0",
+                "psr/log": "^1.0"
+            },
+            "suggest": {
+                "psr/log": "Allows logging deprecations via PSR-3 logger implementation"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.",
+            "homepage": "https://www.doctrine-project.org/",
+            "support": {
+                "issues": "https://github.com/doctrine/deprecations/issues",
+                "source": "https://github.com/doctrine/deprecations/tree/v0.5.3"
+            },
+            "time": "2021-03-21T12:59:47+00:00"
         },
         {
             "name": "doctrine/event-manager",
diff --git a/phpstan.neon b/phpstan.neon
index d797e2f1ca3c..ba1fee1893fb 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -182,10 +182,6 @@ parameters:
       message: "#^Parameter \\#1 \\$name of function setcookie expects string, string\\|false given\\.$#"
       count: 1
       path: typo3/sysext/install/Classes/Service/SessionService.php
-    -
-      message: "#^Parameter \\#1 \\$params of static method Doctrine\\\\DBAL\\\\DriverManager\\:\\:getConnection\\(\\) expects array\\(\\?'wrapperClass' \\=\\> class\\-string\\<Doctrine\\\\DBAL\\\\Connection\\>\\), array\\<string, string\\>&nonEmpty given\\.$#"
-      count: 1
-      path: typo3/sysext/install/Classes/Controller/InstallerController.php
     -
       message: "#^Parameter \\#4 \\$(col|color) of function imagefill expects int, int\\|false given\\.$#"
       count: 1
diff --git a/typo3/sysext/core/composer.json b/typo3/sysext/core/composer.json
index cc720e900fee..41bd894a97ff 100644
--- a/typo3/sysext/core/composer.json
+++ b/typo3/sysext/core/composer.json
@@ -30,7 +30,7 @@
 		"christian-riesen/base32": "^1.5",
 		"cogpowered/finediff": "~0.3.1",
 		"doctrine/annotations": "^1.11",
-		"doctrine/dbal": "^2.12",
+		"doctrine/dbal": "^2.13",
 		"doctrine/instantiator": "^1.4",
 		"doctrine/lexer": "^1.2.1",
 		"egulias/email-validator": "^2.1",
diff --git a/typo3/sysext/install/composer.json b/typo3/sysext/install/composer.json
index 3b98638a64e7..cca7e82803f9 100644
--- a/typo3/sysext/install/composer.json
+++ b/typo3/sysext/install/composer.json
@@ -19,7 +19,7 @@
 		"sort-packages": true
 	},
 	"require": {
-		"doctrine/dbal": "^2.12",
+		"doctrine/dbal": "^2.13",
 		"nikic/php-parser": "^4.10.4",
 		"symfony/finder": "^5.3.0",
 		"typo3/cms-core": "11.3.*@dev",
diff --git a/typo3/sysext/redirects/composer.json b/typo3/sysext/redirects/composer.json
index 8a4f4136758b..140f22288764 100644
--- a/typo3/sysext/redirects/composer.json
+++ b/typo3/sysext/redirects/composer.json
@@ -19,7 +19,7 @@
 		"sort-packages": true
 	},
 	"require": {
-		"doctrine/dbal": "^2.12",
+		"doctrine/dbal": "^2.13",
 		"psr/http-message": "^1.0",
 		"psr/log": "^1.0",
 		"symfony/console": "^5.3.0",
-- 
GitLab