Skip to content

Commit

Permalink
Develop to master (#1166)
Browse files Browse the repository at this point in the history
  • Loading branch information
damcou authored Oct 21, 2021
1 parent f905c1f commit 0757549
Show file tree
Hide file tree
Showing 76 changed files with 252 additions and 2,038 deletions.
12 changes: 7 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ shared: &shared
name: Before setup
command: |
echo 'memory_limit = 256M' | sudo tee /usr/local/etc/php/php.ini
wget https://alg.li/algolia-keys && chmod +x algolia-keys
- run:
name: Get keys from dealer
command: |
if [ "$CIRCLE_PR_REPONAME" ]; then
curl -s https://algoliasearch-client-keygen.herokuapp.com | sh >> $BASH_ENV
fi
- run:
name: Run tests
command: |
cd ~/magento_directory/dev/tests/integration
export CI_BUILD_NUM=$CIRCLE_BUILD_NUM
export CI_PROJ_USERNAME=$CIRCLE_PROJECT_USERNAME
export CI_PROJ_REPONAME=$CIRCLE_PROJECT_REPONAME
eval $(~/build_directory/algoliasearch-magento-2/algolia-keys export)
sudo service elasticsearch start # for some reasons has to be launched with the step
sleep 10
php -dmemory_limit=-1 ../../../vendor/bin/phpunit --debug ../../../vendor/algolia/algoliasearch-magento-2/Test
Expand Down
21 changes: 0 additions & 21 deletions Block/Adminhtml/Category/Merchandising.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Algolia\AlgoliaSearch\Helper\ConfigHelper;
use Algolia\AlgoliaSearch\Helper\Data;
use Algolia\AlgoliaSearch\Helper\ProxyHelper;
use Magento\Backend\Block\Template\Context;
use Magento\Catalog\Model\Category;
use Magento\Framework\Registry;
Expand All @@ -23,9 +22,6 @@ class Merchandising extends \Magento\Backend\Block\Template
/** @var Data */
private $coreHelper;

/** @var ProxyHelper */
private $proxyHelper;

/** @var \Magento\Store\Model\StoreManagerInterface */
private $storeManager;

Expand All @@ -34,21 +30,18 @@ class Merchandising extends \Magento\Backend\Block\Template
* @param Registry $registry
* @param ConfigHelper $configHelper
* @param Data $coreHelper
* @param ProxyHelper $proxyHelper
* @param array $data
*/
public function __construct(
Context $context,
Registry $registry,
ConfigHelper $configHelper,
Data $coreHelper,
ProxyHelper $proxyHelper,
array $data = []
) {
$this->registry = $registry;
$this->configHelper = $configHelper;
$this->coreHelper = $coreHelper;
$this->proxyHelper = $proxyHelper;
$this->storeManager = $context->getStoreManager();

parent::__construct($context, $data);
Expand Down Expand Up @@ -89,20 +82,6 @@ public function getCoreHelper()
return $this->coreHelper;
}

/** @return bool */
public function isQueryRulesEnabled()
{
$info = $this->proxyHelper->getInfo(ProxyHelper::INFO_TYPE_QUERY_RULES);

// In case the call to API proxy fails,
// be "nice" and return true
if ($info && array_key_exists('query_rules', $info)) {
return $info['query_rules'];
}

return true;
}

/**
* @throws \Magento\Framework\Exception\NoSuchEntityException
*
Expand Down
23 changes: 0 additions & 23 deletions Block/Adminhtml/LandingPage/SearchConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Algolia\AlgoliaSearch\Helper\ConfigHelper;
use Algolia\AlgoliaSearch\Helper\Data;
use Algolia\AlgoliaSearch\Helper\ProxyHelper;
use Algolia\AlgoliaSearch\Model\LandingPage;
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Registry;
Expand All @@ -23,9 +22,6 @@ class SearchConfiguration extends \Magento\Backend\Block\Template
/** @var Data */
private $coreHelper;

/** @var ProxyHelper */
protected $proxyHelper;

/** @var int */
protected $planLevel;

Expand All @@ -34,21 +30,18 @@ class SearchConfiguration extends \Magento\Backend\Block\Template
* @param Registry $registry
* @param ConfigHelper $configHelper
* @param Data $coreHelper
* @param ProxyHelper $proxyHelper
* @param array $data
*/
public function __construct(
Context $context,
Registry $registry,
ConfigHelper $configHelper,
Data $coreHelper,
ProxyHelper $proxyHelper,
array $data = []
) {
$this->registry = $registry;
$this->configHelper = $configHelper;
$this->coreHelper = $coreHelper;
$this->proxyHelper = $proxyHelper;

parent::__construct($context, $data);
}
Expand All @@ -70,20 +63,4 @@ public function getCoreHelper()
{
return $this->coreHelper;
}

/** @return int */
public function getPlanLevel()
{
if ($this->planLevel == null) {
$planLevel = 1;
$planLevelInfo = $this->proxyHelper->getInfo(ProxyHelper::INFO_TYPE_PLAN_LEVEL);

if (isset($planLevelInfo['plan_level'])) {
$planLevel = (int) $planLevelInfo['plan_level'];
}
$this->planLevel = $planLevel;
}

return $this->planLevel;
}
}
21 changes: 0 additions & 21 deletions Block/Adminhtml/Query/Merchandising.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Algolia\AlgoliaSearch\Helper\ConfigHelper;
use Algolia\AlgoliaSearch\Helper\Data;
use Algolia\AlgoliaSearch\Helper\ProxyHelper;
use Algolia\AlgoliaSearch\Model\Query;
use Magento\Backend\Block\Template\Context;
use Magento\Framework\Registry;
Expand All @@ -23,9 +22,6 @@ class Merchandising extends \Magento\Backend\Block\Template
/** @var Data */
private $coreHelper;

/** @var ProxyHelper */
private $proxyHelper;

/** @var \Magento\Store\Model\StoreManagerInterface */
private $storeManager;

Expand All @@ -34,21 +30,18 @@ class Merchandising extends \Magento\Backend\Block\Template
* @param Registry $registry
* @param ConfigHelper $configHelper
* @param Data $coreHelper
* @param ProxyHelper $proxyHelper
* @param array $data
*/
public function __construct(
Context $context,
Registry $registry,
ConfigHelper $configHelper,
Data $coreHelper,
ProxyHelper $proxyHelper,
array $data = []
) {
$this->registry = $registry;
$this->configHelper = $configHelper;
$this->coreHelper = $coreHelper;
$this->proxyHelper = $proxyHelper;
$this->storeManager = $context->getStoreManager();

parent::__construct($context, $data);
Expand All @@ -72,20 +65,6 @@ public function getCoreHelper()
return $this->coreHelper;
}

/** @return bool */
public function isQueryRulesEnabled()
{
$info = $this->proxyHelper->getInfo(ProxyHelper::INFO_TYPE_QUERY_RULES);

// In case the call to API proxy fails,
// be "nice" and return true
if ($info && array_key_exists('query_rules', $info)) {
return $info['query_rules'];
}

return true;
}

/**
* @throws \Magento\Framework\Exception\NoSuchEntityException
*
Expand Down
26 changes: 4 additions & 22 deletions Block/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,7 @@ public function getConfiguration()

private function areCategoriesInFacets($facets)
{
foreach ($facets as $facet) {
if ($facet['attribute'] === 'categories') {
return true;
}
}

return false;
return in_array('categories', array_column($facets, 'attribute'));
}

private function getUrlTrackedParameters()
Expand Down Expand Up @@ -336,28 +330,16 @@ private function isLandingPage()

private function getLandingPageId()
{
if (!$this->isLandingPage()) {
return '';
}

return $this->getCurrentLandingPage()->getId();
return $this->isLandingPage() ? $this->getCurrentLandingPage()->getId() : '';
}

private function getLandingPageQuery()
{
if (!$this->isLandingPage()) {
return '';
}

return $this->getCurrentLandingPage()->getQuery();
return $this->isLandingPage() ? $this->getCurrentLandingPage()->getQuery() : '';
}

private function getLandingPageConfiguration()
{
if (!$this->isLandingPage()) {
return json_encode([]);
}

return $this->getCurrentLandingPage()->getConfiguration();
return $this->isLandingPage() ? $this->getCurrentLandingPage()->getConfiguration() : json_encode([]);
}
}
46 changes: 0 additions & 46 deletions Block/System/Form/Field/Logo.php

This file was deleted.

32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# CHANGE LOG

## 3.2.0

### UPDATES
- Update module sequence and indexers (#1132)
- Add additional attributes for customer groups (#1144)
- Add priceRanges back to uistate (#1151)
- Set visibility of getTaxPrice() to public in ProductWithoutChildren (#1159) (@JeroenVanLeusden)
- Improve check: and try to handle URL by URL rewrites if request path is NULL. (#1149) (@vmalyk)
- Unfilter getCoreCategories() from private getCategoryById() (#1154)
- Add ability to change region for Analytics call (#1131) (@bchatard)

### FIXES
- Add missing indexName for autocomplete sections (#1133)
- Add check if color object is defined for adaptive images (#1135)
- Add small change on category indexing for Enterprise Edition (#1136)
- Refactor loops and fix analytics overview issues (#1137)
- Fix missing 'out of' translation on search results page (#1139) (@NickdeK)
- Restore query value in custom instant search box (#1142) (@vmalyk)
- Fix instantsearch rangeInput labels (#1148)
- Recalculate special price if zero default pricing (#1160)
- Add missing label for queue method rebuildCategoryIndex (#1152) (@tezlopchan)
- Fix max original price for product with children (#1155) (@valeriish)
- Store scope category merchandising based on store_id param (#1156)
- Fix Subproduct Image Data (#1157)
- Add try/catch to add to cart push events (#1158)
- Fix for BE side renderting and caching 2 types of content (#1161) (@sudma)
- Fix: categories not included filtering on product listing (#1163)
- Fix: removing old feature checking for C&C that triggers deprecated endpoint (#1164)

### TOOLING
- Update CI testing (#1140)

## 3.1.0

### UPDATES
Expand Down
Loading

0 comments on commit 0757549

Please sign in to comment.