-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1211 from algolia/develop
Merge to master from develop for release v3.7.0
- Loading branch information
Showing
10 changed files
with
116 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Algolia Search for Magento 2 | ||
================== | ||
|
||
![Latest version](https://img.shields.io/badge/latest-3.6.1-green) | ||
![Latest version](https://img.shields.io/badge/latest-3.7.0-green) | ||
![Magento 2](https://img.shields.io/badge/Magento-2.4.x-orange) | ||
|
||
![PHP](https://img.shields.io/badge/PHP-7.4%2C8.1-blue) | ||
|
@@ -92,6 +92,7 @@ Knowing the version of the library will help you understand what is available in | |
| v1.x | [0.26.0](https://github.com/algolia/autocomplete.js/tree/v0.26.0) | [2.10.2](https://github.com/algolia/instantsearch.js/tree/v2.10.2) | [0.0.14](https://cdn.jsdelivr.net/npm/[email protected]) | | ||
| v2.x | [0.38.0](https://github.com/algolia/autocomplete.js/tree/v0.38.0) | [4.7.2](https://github.com/algolia/instantsearch.js/tree/v4.7.2) | [1.4.0](https://github.com/algolia/search-insights.js/tree/v1.4.0) | | ||
| v3.x | [0.38.0](https://github.com/algolia/autocomplete.js/tree/v0.38.0) | [4.15.0](https://github.com/algolia/instantsearch.js/tree/v4.15.0) | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | | ||
| v3.7.x | [0.38.0](https://github.com/algolia/autocomplete.js/tree/v0.38.0) | [4.41.0](https://github.com/algolia/instantsearch.js/tree/v4.41.0) | [1.7.1](https://github.com/algolia/search-insights.js/tree/v1.7.1) | | ||
|
||
The autocomplete and instantsearch libraries are accessible in the `algoliaBundle` global. This bundle is a prepackage javascript file that contains it's dependencies. What is included in this bundle can be seen here: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?php | ||
|
||
namespace Algolia\AlgoliaSearch\Setup\Patch\Data; | ||
|
||
use Magento\Framework\Indexer\IndexerInterfaceFactory; | ||
use Magento\Framework\Mview\View\SubscriptionFactory; | ||
use Magento\Framework\Setup\ModuleDataSetupInterface; | ||
use Magento\Framework\Setup\Patch\DataPatchInterface; | ||
|
||
class UpdateMviewPatch implements DataPatchInterface | ||
{ | ||
/** | ||
* @var SubscriptionFactory | ||
*/ | ||
private $subscriptionFactory; | ||
|
||
/** | ||
* @var IndexerInterfaceFactory | ||
*/ | ||
private $indexerFactory; | ||
|
||
/** | ||
* @var ModuleDataSetupInterface | ||
*/ | ||
private $moduleDataSetup; | ||
|
||
/** | ||
* @param SubscriptionFactory $subscriptionFactory | ||
* @param ModuleDataSetupInterface $moduleDataSetup | ||
* @param IndexerInterfaceFactory $indexerFactory | ||
*/ | ||
public function __construct( | ||
SubscriptionFactory $subscriptionFactory, | ||
ModuleDataSetupInterface $moduleDataSetup, | ||
IndexerInterfaceFactory $indexerFactory | ||
) { | ||
$this->subscriptionFactory = $subscriptionFactory; | ||
$this->moduleDataSetup = $moduleDataSetup; | ||
$this->indexerFactory = $indexerFactory; | ||
} | ||
|
||
public function apply() | ||
{ | ||
$this->moduleDataSetup->getConnection()->startSetup(); | ||
|
||
try { | ||
/** @var \Magento\Framework\Indexer\IndexerInterface $indexer */ | ||
$indexer = $this->indexerFactory->create()->load('algolia_products'); | ||
$subscriptionInstance = $this->subscriptionFactory->create( | ||
[ | ||
'view' => $indexer->getView(), | ||
'tableName' => 'catalog_product_index_price', | ||
'columnName' => 'entity_id', | ||
] | ||
); | ||
$subscriptionInstance->remove(); | ||
} catch (\Exception $e) { | ||
// Skip | ||
} | ||
$this->moduleDataSetup->getConnection()->endSetup(); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public static function getDependencies() | ||
{ | ||
return []; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function getAliases() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters