Skip to content

Commit

Permalink
[TASK] Update doctrine/dbal to ^2.8.1
Browse files Browse the repository at this point in the history
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/+/61077
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Manuel Selbach <manuel_selbach@yahoo.de>
Reviewed-by: Manuel Selbach <manuel_selbach@yahoo.de>
  • Loading branch information
manuelselbach committed Jun 17, 2019
1 parent 79825a6 commit c62ae81
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 20 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"algo26-matthias/idna-convert": "^1.1.0",
"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",
Expand Down
37 changes: 20 additions & 17 deletions composer.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,20 @@ public function onSchemaIndexDefinition(SchemaIndexDefinitionEventArgs $event)
$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(
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"algo26-matthias/idna-convert": "^1.1.0",
"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",
Expand Down

0 comments on commit c62ae81

Please sign in to comment.