From 87817d5afd214f2e2d2c98d84cc1475ef78ddd74 Mon Sep 17 00:00:00 2001 From: Jan Petr Date: Wed, 10 Aug 2016 14:17:18 +0200 Subject: [PATCH 1/2] Fix search adapter to work on both Magento ~2.0.0 and ~2.1.0 --- Adapter/Algolia.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Adapter/Algolia.php b/Adapter/Algolia.php index 4f0ddb237..b68a3b733 100755 --- a/Adapter/Algolia.php +++ b/Adapter/Algolia.php @@ -136,15 +136,17 @@ public function query(RequestInterface $request) } $getDocumentMethod = 'getDocument21'; + $storeDocumentsMethod = 'storeApiDocuments'; if (version_compare($this->config->getMagentoVersion(), '2.1.0', '<') === true) { $getDocumentMethod = 'getDocument20'; + $storeDocumentsMethod = 'storeDocuments'; } $apiDocuments = array_map(function ($document) use ($getDocumentMethod) { return $this->{$getDocumentMethod}($document); }, $documents); - $table = $temporaryStorage->storeApiDocuments($apiDocuments); + $table = $temporaryStorage->{$storeDocumentsMethod}($apiDocuments); } $aggregations = $this->aggregationBuilder->build($request, $table); From da8148eb27c8e8bb48c1854a0ce91f7f60b222c8 Mon Sep 17 00:00:00 2001 From: Jan Petr Date: Thu, 11 Aug 2016 11:37:36 +0200 Subject: [PATCH 2/2] Bump to 0.8.2 --- CHANGELOG.md | 5 +++++ README.md | 2 +- composer.json | 2 +- etc/module.xml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 812b8af2c..0ade3241d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 0.8.2 + +- Fix fatal error thrown on Algolia search Adapter on version ~2.0.0 +- Fix version in `composer.json` + ## 0.8.1 - Fix fatal error thrown when "Make SEO request" was turned on diff --git a/README.md b/README.md index bebec225e..5d17baec2 100755 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This extension replaces the default search of Magento with a typo-tolerant, fast See features and benefits of [Algolia Search Extension for Magento](https://community.algolia.com/magento). -![Latest version](https://img.shields.io/badge/latest-0.8.1-green.svg) +![Latest version](https://img.shields.io/badge/latest-0.8.2-green.svg) ![PHP >= 5.5.22](https://img.shields.io/badge/php-%3E=5.5.22-green.svg) Documentation diff --git a/composer.json b/composer.json index 4fc3b2650..061eaaa88 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "algolia/algoliasearch-magento-2", "description": "Algolia Search Magento", "type": "magento2-module", - "version": "0.0.1", + "version": "0.8.2", "require": { "php": "~5.5.0|~5.6.0|~7.0.0", "magento/framework": "~100.0", diff --git a/etc/module.xml b/etc/module.xml index eebe68e2d..6b120f766 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file