From 230a508583ee47e724463fc4437e211ef2943779 Mon Sep 17 00:00:00 2001 From: Mateusz Zalewski Date: Fri, 29 Mar 2019 10:04:41 +0100 Subject: [PATCH 1/2] mySQL 5.7 on Travis --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0d978965bcd..59622900ab1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,14 @@ env: - SYLIUS_CACHE_DIR=$HOME/.sylius-cache - SYLIUS_BUILD_DIR=etc/build +addons: + apt: + sources: + - mysql-5.7-trusty + packages: + - mysql-server + - mysql-client + matrix: include: - From 968722e02f64af25c999a689124123520f09c4b5 Mon Sep 17 00:00:00 2001 From: laSyntez Date: Thu, 28 Mar 2019 15:04:02 +0000 Subject: [PATCH 2/2] [Product] Fixed products sorting by price Updated the createShopListQueryBuilder method of ProductRepository to get rid of the SQL error that causes a 500 one when trying to sort products by price in the shop. --- src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php index 428f439730c..f37bae7c66a 100644 --- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php +++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php @@ -111,6 +111,8 @@ public function createShopListQueryBuilder( ; $queryBuilder + ->addSelect('variant') + ->addSelect('channelPricing') ->innerJoin('o.variants', 'variant') ->innerJoin('variant.channelPricings', 'channelPricing') ->andWhere('channelPricing.channelCode = :channelCode')