Skip to content

Commit

Permalink
Merge pull request #40 from algolia/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Jan Petr authored Aug 11, 2016
2 parents e145649 + d7098b8 commit fe552af
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Adapter/Algolia.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Algolia_AlgoliaSearch" setup_version="0.8.1">
<module name="Algolia_AlgoliaSearch" setup_version="0.8.2">
</module>
</config>

0 comments on commit fe552af

Please sign in to comment.