[BUGFIX] Order extensions by integerVersion instead of version 00/50900/5
authorUlrik Høyer Kold <kontakt@ulrikkold.dk>
Thu, 8 Dec 2016 14:53:16 +0000 (15:53 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Mon, 12 Dec 2016 16:12:44 +0000 (17:12 +0100)
Return the results of findByExtensionKeyOrderedByVersion ordered by
column 'integerVersion' instead of 'version' in order to avoid a wrong
order for version numbers like "1.9.2" and "1.10.0".

Releases: master, 7.6
Resolves: #78923
Change-Id: I89f5cf54aa4ee7ac87c5af2aa4ac3946d53f10d6
Reviewed-on: https://review.typo3.org/50900
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/extensionmanager/Classes/Domain/Repository/ExtensionRepository.php

index 5c02f2c..126fbbe 100644 (file)
@@ -93,7 +93,7 @@ class ExtensionRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
     {
         $query = $this->createQuery();
         $query->matching($query->logicalAnd($query->equals('extensionKey', $extensionKey), $query->greaterThanOrEqual('reviewState', 0)));
-        $query->setOrderings(['version' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING]);
+        $query->setOrderings(['integerVersion' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING]);
         return $query->execute();
     }