[TASK] Update doctrine/dbal to ^2.8.1 94/60994/5
authorManuel Selbach <manuel_selbach@yahoo.de>
Thu, 13 Jun 2019 07:50:01 +0000 (09:50 +0200)
committerManuel Selbach <manuel_selbach@yahoo.de>
Mon, 17 Jun 2019 16:13:11 +0000 (18:13 +0200)
doctrine/dbal 2.8.x ran into unmaintained mode:
https://www.doctrine-project.org/projects/dbal.html

We should upgrade to at least 2.9:

    composer req doctrine/dbal:^2.8.1

which installs 2.9.2

Resolves: #88553
Releases: master, 9.5
Change-Id: Id0c20cbb3102b5086e1c4d9dcef1b32fed67db7d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60994
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Susanne Moog <look@susi.dev>
Tested-by: Manuel Selbach <manuel_selbach@yahoo.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Susanne Moog <look@susi.dev>
Reviewed-by: Manuel Selbach <manuel_selbach@yahoo.de>
composer.json
composer.lock
typo3/sysext/core/Classes/Database/Schema/EventListener/SchemaIndexDefinitionListener.php
typo3/sysext/core/composer.json

index 03a18b8..1607e51 100644 (file)
@@ -39,7 +39,7 @@
                "ext-xml": "*",
                "cogpowered/finediff": "~0.3.1",
                "doctrine/annotations": "^1.3",
-               "doctrine/dbal": "~2.8.0",
+               "doctrine/dbal": "^2.8.1",
                "doctrine/instantiator": "^1.1",
                "doctrine/lexer": "^1.0",
                "guzzlehttp/guzzle": "^6.3.0",
index faa6d9a..93f3807 100644 (file)
@@ -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": "58eddde5caaf9a936e67fdc51fbd45c2",
+    "content-hash": "c9fcf3151c3f81c4e6308ff61ccb261c",
     "packages": [
         {
             "name": "cogpowered/finediff",
         },
         {
             "name": "doctrine/dbal",
-            "version": "v2.8.1",
+            "version": "v2.9.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/dbal.git",
-                "reference": "a9019c1e3232eacace373a6ba957a85b66a255c1"
+                "reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/dbal/zipball/a9019c1e3232eacace373a6ba957a85b66a255c1",
-                "reference": "a9019c1e3232eacace373a6ba957a85b66a255c1",
+                "url": "https://api.github.com/repos/doctrine/dbal/zipball/22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9",
+                "reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9",
                 "shasum": ""
             },
             "require": {
                 "php": "^7.1"
             },
             "require-dev": {
-                "doctrine/coding-standard": "^4.0",
+                "doctrine/coding-standard": "^5.0",
                 "jetbrains/phpstorm-stubs": "^2018.1.2",
                 "phpstan/phpstan": "^0.10.1",
-                "phpunit/phpunit": "^7.1.2",
-                "phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5",
+                "phpunit/phpunit": "^7.4",
                 "symfony/console": "^2.0.5|^3.0|^4.0",
                 "symfony/phpunit-bridge": "^3.4.5|^4.0.5"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.8.x-dev",
+                    "dev-master": "2.9.x-dev",
                     "dev-develop": "3.0.x-dev"
                 }
             },
             "autoload": {
-                "psr-0": {
-                    "Doctrine\\DBAL\\": "lib/"
+                "psr-4": {
+                    "Doctrine\\DBAL\\": "lib/Doctrine/DBAL"
                 }
             },
             "notification-url": "https://packagist.org/downloads/",
                     "email": "jonwage@gmail.com"
                 }
             ],
-            "description": "Database Abstraction Layer",
-            "homepage": "http://www.doctrine-project.org",
+            "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.",
+            "homepage": "https://www.doctrine-project.org/projects/dbal.html",
             "keywords": [
+                "abstraction",
                 "database",
                 "dbal",
+                "mysql",
                 "persistence",
+                "pgsql",
+                "php",
                 "queryobject"
             ],
-            "time": "2018-12-04T06:44:25+00:00"
+            "time": "2018-12-31T03:27:51+00:00"
         },
         {
             "name": "doctrine/event-manager",
index c8f6be9..ea9c319 100644 (file)
@@ -47,7 +47,20 @@ class SchemaIndexDefinitionListener
             $event->getTable(),
             $event->getConnection()->getDatabase()
         );
-        $sql .= ' AND ' . $connection->quoteIdentifier('INDEX_NAME') . ' = ' . $connection->quote($indexName);
+
+        // check whether ORDER BY is available in SQL
+        // and place the part 'AND INDEX_NAME = "SOME_INDEX_NAME"' before that
+        if (strpos($sql, 'ORDER BY') !== false) {
+            $posOfOrderBy = strpos($sql, 'ORDER BY');
+            $tmpSql = substr($sql, 0, $posOfOrderBy);
+            $tmpSql .= ' AND ' . $connection->quoteIdentifier('INDEX_NAME') . ' = ' . $connection->quote($indexName);
+            $tmpSql .= ' ' . substr($sql, $posOfOrderBy);
+            $sql = $tmpSql;
+            unset($tmpSql);
+        } else {
+            $sql .= ' AND ' . $connection->quoteIdentifier('INDEX_NAME') . ' = ' . $connection->quote($indexName);
+        }
+
         $tableIndexes = $event->getConnection()->fetchAll($sql);
 
         $subPartColumns = array_filter(
index 583dab1..d3b40ac 100644 (file)
@@ -21,7 +21,7 @@
                "ext-xml": "*",
                "cogpowered/finediff": "~0.3.1",
                "doctrine/annotations": "^1.3",
-               "doctrine/dbal": "~2.8.0",
+               "doctrine/dbal": "^2.8.1",
                "doctrine/instantiator": "^1.1",
                "doctrine/lexer": "^1.0",
                "guzzlehttp/guzzle": "^6.3.0",