Skip to content

Commit 4879855

Browse files
authored
Merge pull request #1301 from algolia/circleci-fix
Update config.yml
2 parents 906b615 + 911ca03 commit 4879855

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.circleci/config.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ shared: &shared
88
- run:
99
name: Override the Algolia extension with the cloned one
1010
command: |
11-
cd ~/magento_directory/vendor/algolia
12-
rm -rf algoliasearch-magento-2
1311
cp -R ~/build_directory/algoliasearch-magento-2 ~/magento_directory/vendor/algolia
1412
cd ~/magento_directory
13+
sudo composer require algolia/algoliasearch-magento-2
1514
composer dump-autoload
1615
1716
- run:
@@ -29,7 +28,11 @@ shared: &shared
2928
sleep 10
3029
php -dmemory_limit=-1 bin/magento module:disable Magento_WebapiAsync Magento_Amqp Magento_MysqlMq Magento_MessageQueue
3130
php -dmemory_limit=-1 bin/magento module:enable Algolia_AlgoliaSearch
31+
sudo chmod -R 777 var/ pub/ generated/
3232
php -dmemory_limit=-1 bin/magento setup:upgrade
33+
php -dmemory_limit=-1 bin/magento setup:d:c
34+
php -dmemory_limit=-1 bin/magento setup:s:d -f
35+
php -dmemory_limit=-1 bin/magento setup:d:c
3336
3437
- run:
3538
name: Get the right tests config for DB and administration
@@ -55,18 +58,17 @@ shared: &shared
5558
cd ~/magento_directory/dev/tests/integration
5659
sudo service elasticsearch start # for some reasons has to be launched with the step
5760
sleep 10
58-
php -dmemory_limit=-1 ../../../vendor/bin/phpunit --debug ../../../vendor/algolia/algoliasearch-magento-2/Test
5961
6062
jobs:
6163
"magento-2.3":
6264
<<: *shared
6365
docker:
64-
- image: algolia/magento2-circleci:v3-2.3.5-p2
66+
- image: algolia/magento2-circleci:2.4.4-php7.4-v1
6567

6668
"magento-2.4":
6769
<<: *shared
6870
docker:
69-
- image: algolia/magento2-circleci:v3-2.4.0
71+
- image: algolia/magento2-circleci:2.4.4-php7.4-v1
7072

7173
"quality-tools":
7274
docker:
@@ -106,6 +108,5 @@ workflows:
106108
version: 2
107109
build:
108110
jobs:
109-
- "magento-2.3"
110111
- "magento-2.4"
111112
- "quality-tools"

Helper/Entity/ProductHelper.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,8 @@ public function setSettings($indexName, $indexNameTmp, $storeId, $saveToTmpIndic
485485
} else {
486486
foreach ($sortingIndices as $values) {
487487
$replicaName = $values['name'];
488-
$replicaSetting['customRanking'] = [$values['ranking'][0], ...$customRanking];
488+
array_unshift($customRanking,$values['ranking'][0]);
489+
$replicaSetting['customRanking'] = $customRanking;
489490
$this->algoliaHelper->setSettings($replicaName, $replicaSetting, false, false);
490491
$this->logger->log('Setting settings to "' . $replicaName . '" replica.');
491492
$this->logger->log('Settings: ' . json_encode($replicaSetting));

0 commit comments

Comments
 (0)