Skip to content

Commit 5097489

Browse files
authored
Merge pull request #1686 from algolia/release/3.13.8-dev
Release/3.13.8 dev
2 parents adfa7e8 + 7c61852 commit 5097489

File tree

7 files changed

+90
-19
lines changed

7 files changed

+90
-19
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGE LOG
22

3+
## 3.13.8
4+
5+
### Bug Fixes
6+
- Restored compatibility with PHP 7.4
7+
38
## 3.13.7
49

510
### Features

Model/Config/AutomaticPriceIndexingComment.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@
77

88
class AutomaticPriceIndexingComment implements CommentInterface
99
{
10+
/**
11+
* @var UrlInterface
12+
*/
13+
protected $urlInterface;
14+
1015
public function __construct(
11-
protected UrlInterface $urlInterface
12-
) { }
16+
UrlInterface $urlInterface
17+
) {
18+
$this->urlInterface = $urlInterface;
19+
}
1320

1421
public function getCommentText($elementValue)
1522
{

Plugin/AddToCartRedirectForInsights.php

+45-8
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,51 @@ class AddToCartRedirectForInsights
2222
*/
2323
private $requestInfoFilter;
2424

25+
/**
26+
* @var StoreManagerInterface
27+
*/
28+
protected $storeManager;
29+
30+
/**
31+
* @var ProductRepositoryInterface
32+
*/
33+
protected $productRepository;
34+
35+
/**
36+
* @var Session
37+
*/
38+
protected $checkoutSession;
39+
40+
/**
41+
* @var StockRegistryInterface
42+
*/
43+
protected $stockRegistry;
44+
45+
/**
46+
* @var ManagerInterface
47+
*/
48+
protected ManagerInterface $eventManager;
49+
50+
/**
51+
* @var ConfigHelper
52+
*/
53+
protected ConfigHelper $configHelper;
54+
2555
public function __construct(
26-
protected StoreManagerInterface $storeManager,
27-
protected ProductRepositoryInterface $productRepository,
28-
protected Session $checkoutSession,
29-
protected StockRegistryInterface $stockRegistry,
30-
protected ManagerInterface $eventManager,
31-
protected ConfigHelper $configHelper,
32-
) {}
56+
StoreManagerInterface $storeManager,
57+
ProductRepositoryInterface $productRepository,
58+
Session $checkoutSession,
59+
StockRegistryInterface $stockRegistry,
60+
ManagerInterface $eventManager,
61+
ConfigHelper $configHelper
62+
) {
63+
$this->storeManager = $storeManager;
64+
$this->productRepository = $productRepository;
65+
$this->checkoutSession = $checkoutSession;
66+
$this->stockRegistry = $stockRegistry;
67+
$this->eventManager = $eventManager;
68+
$this->configHelper = $configHelper;
69+
}
3370

3471
/**
3572
* @param Cart $cartModel
@@ -41,7 +78,7 @@ public function __construct(
4178
* @throws LocalizedException
4279
* @throws NoSuchEntityException
4380
*/
44-
public function beforeAddProduct(Cart $cartModel, int|Product $productInfo, array|int|DataObject $requestInfo = null)
81+
public function beforeAddProduct(Cart $cartModel, $productInfo, $requestInfo = null)
4582
{
4683
// First, check is Insights are enabled
4784
if (!$this->configHelper->isClickConversionAnalyticsEnabled($this->storeManager->getStore()->getId())) {

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Algolia Search & Discovery extension for Magento 2
22
==================================================
33

4-
![Latest version](https://img.shields.io/badge/latest-3.13.7-green)
4+
![Latest version](https://img.shields.io/badge/latest-3.13.8-green)
55
![Magento 2](https://img.shields.io/badge/Magento-2.4.x-orange)
66

77
![PHP](https://img.shields.io/badge/PHP-8.2%2C8.1%2C7.4-blue)

Service/Product/MissingPriceIndexHandler.php

+28-6
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,44 @@ class MissingPriceIndexHandler
1919

2020
protected array $_indexedProducts = [];
2121

22-
protected IndexerInterface $indexer;
22+
/**
23+
* @var CollectionFactory
24+
*/
25+
protected $productCollectionFactory;
26+
27+
/**
28+
* @var ResourceConnection
29+
*/
30+
protected $resourceConnection;
31+
32+
/**
33+
* @var Logger
34+
*/
35+
protected $logger;
36+
37+
/**
38+
* @var IndexerInterface
39+
*/
40+
protected $indexer;
41+
2342
public function __construct(
24-
protected CollectionFactory $productCollectionFactory,
25-
protected ResourceConnection $resourceConnection,
26-
protected Logger $logger,
43+
CollectionFactory $productCollectionFactory,
44+
ResourceConnection $resourceConnection,
45+
Logger $logger,
2746
IndexerRegistry $indexerRegistry
2847
)
2948
{
49+
$this->productCollectionFactory = $productCollectionFactory;
50+
$this->resourceConnection = $resourceConnection;
51+
$this->logger = $logger;
3052
$this->indexer = $indexerRegistry->get('catalog_product_price');
3153
}
3254

3355
/**
3456
* @param string[]|ProductCollection $products
3557
* @return string[] Array of product IDs that were reindexed by this repair operation
3658
*/
37-
public function refreshPriceIndex(array|ProductCollection $products): array
59+
public function refreshPriceIndex($products): array
3860
{
3961
$reindexIds = $this->getProductIdsToReindex($products);
4062
if (empty($reindexIds)) {
@@ -54,7 +76,7 @@ public function refreshPriceIndex(array|ProductCollection $products): array
5476
* @param string[]|ProductCollection $products - either an explicit list of product ids or a product collection
5577
* @return string[] IDs of products that require price reindexing (will be empty if no indexing is required)
5678
*/
57-
protected function getProductIdsToReindex(array|ProductCollection $products): array
79+
protected function getProductIdsToReindex($products): array
5880
{
5981
$productIds = $products instanceof ProductCollection
6082
? $this->getProductIdsFromCollection($products)

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Algolia Search & Discovery extension for Magento 2",
44
"type": "magento2-module",
55
"license": ["MIT"],
6-
"version": "3.13.7",
6+
"version": "3.13.8",
77
"require": {
88
"magento/framework": "~102.0|~103.0",
99
"algolia/algoliasearch-client-php": "3.3.2",

etc/module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
3-
<module name="Algolia_AlgoliaSearch" setup_version="3.13.7">
3+
<module name="Algolia_AlgoliaSearch" setup_version="3.13.8">
44
<sequence>
55
<module name="Magento_Theme"/>
66
<module name="Magento_Backend"/>

0 commit comments

Comments
 (0)