Skip to content

Commit 4ad1016

Browse files
authored
Merge pull request #1771 from algolia/chore/MAGE-1341-prepare-release-3.16.0
MAGE-1341 Prepare release 3.16.0
2 parents fd5680a + 64f1aa4 commit 4ad1016

File tree

8 files changed

+162
-88
lines changed

8 files changed

+162
-88
lines changed

CHANGELOG.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
# CHANGE LOG
22

3-
## 3.16.0-beta.2
4-
5-
### Updates
6-
- Credentials form expanded by default in admin
7-
- Removed deprecated methods from Entity Helpers
8-
- Removed every calls to deprecated `AlgoliaHelper`'s methods in the codebase, `AlgoliaConnector` is now targeted directly. (`AlgoliaHelper` will be deleted in a future v3.17.0)
9-
- Updated integration tests
10-
11-
### Breaking Changes
12-
- `ProductHelper::setSettings()` is now taking `IndexOptions` objects as two first parameters instead of index names (strings).
13-
14-
## 3.16.0-beta.1
3+
## 3.16.0
154

165
### Features
176

@@ -21,7 +10,7 @@
2110
- CLI commands are now provided to run explicit full reindex of all entities and stores.
2211
- Products and CMS pages can now be reindexed directly from Magento admin grids.
2312
- The indexing queue cron job can now be configured from the Magento admin.
24-
- Dynamic faceting through Algolia merchandsiing rules is now supported in Magento via an opt-in feature flag.
13+
- Dynamic faceting through Algolia merchandising rules is now supported in Magento via an opt-in feature flag.
2514
- No code redirects via merchandising rules in Algolia are now supported in Magento for both Autocomplete and InstantSearch. Support is enabled by default for Autocomplete.
2615
- Integration tests and unit tests added
2716

@@ -30,6 +19,8 @@
3019
- Replica data patches and delete operations have been enhanced to handle potential latency when detaching from the primary index.
3120
- Prices are now indexed using store scoped currency codes.
3221
- Fixed WSOD error on invalid creds when using manual SKU indexer (also included in 3.15.1).
22+
- Fixed Recommend model validation when configuring through the Magento admin
23+
- Fixed edge case with null queries - thank you @PromInc
3324

3425
### Updates
3526
- `beforecontent.html` is no longer used and has been deprecated. If you're overriding or referencing this file, please update your layout and customizations accordingly.
@@ -43,6 +34,29 @@
4334
- InstantSearch has been updated to v4.78.
4435
- Autocomplete has been updated to v1.18.1.
4536
- PHP API client has been pinned to 4.18.3 (also included in 3.15.1).
37+
- Credentials form expanded by default in admin
38+
- Removed deprecated methods from Entity Helpers
39+
- Removed every call to deprecated `AlgoliaHelper`'s methods in the codebase, `AlgoliaConnector` is now targeted directly. (`AlgoliaHelper` will be removed in a future v3.17.0)
40+
- Updated integration tests
41+
42+
### Breaking Changes
43+
- `ProductHelper::setSettings()` is now taking `IndexOptions` objects as two first parameters instead of index names (strings).
44+
45+
## 3.15.1
46+
47+
### Features
48+
- Algolia's [Query Categorization feature](https://www.algolia.com/doc/integration/magento-2/how-it-works/query-categorization) is now compatible with the extension.
49+
50+
### Updates
51+
- Updated integration tests to use `AlgoliaConnector`
52+
- Updated `ReplicaManager` service to handle multi stores properly with a `$storeId` parameter.
53+
- Pinned PHP Client version to 4.18.3
54+
55+
### Bug Fixes
56+
- Fixed `RebuildReplicasPatch` bug where replica detach logic wasn't properly applied in some cases.
57+
- Fixed a bug where credentials errors weren't gracefully handled on the SKU reindexing form
58+
- Fixed a bug where the `q` parameter wasn't properly handled in case it was missing on the catalogsearch page. (thanks @PromInc)
59+
- Fixed Recommend model validation when configuration is saved in the Magento admin.
4660

4761
## 3.15.0
4862

@@ -56,6 +70,7 @@
5670
- Added a feature to enable automatic price indexing within the Advanced section of the configuration (This feature should help alleviate issues where missing pricing records prevent Algolia from being able to index products. See [documentation](https://www.algolia.com/doc/integration/magento-2/troubleshooting/data-indexes-queues/#price-index-dependencies) for further details.)
5771
- Reorganization of the test folders
5872
- Added unit and integration tests for full page cache (FPC)
73+
- Added new CLI command for synonyms deduplication
5974

6075
### Updates
6176
- Tests: Added possibility to run tests with multiple applications IDs.

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
Algolia Search & Discovery extension for Magento 2
22
==================================================
33

4-
![Latest version](https://img.shields.io/badge/latest-3.15.0-green)
4+
![Latest version](https://img.shields.io/badge/latest-3.16.0-green)
55
![Magento 2](https://img.shields.io/badge/Magento-2.4.6+-orange)
6-
![Beta version](https://img.shields.io/badge/beta-3.16.0--beta.1-purple)
76

87
![PHP](https://img.shields.io/badge/PHP-8.1%2C8.2%2C8.3-blue)
98

@@ -36,17 +35,18 @@ Magento 2.3 and earlier versions are no longer supported by the Algolia extensio
3635

3736
Version 3.x of our extension is compatible with Magento 2.4. Review the [Customisation](https://github.com/algolia/algoliasearch-magento-2#customisation) section to learn more about the differences between our extension versions.
3837

39-
| Extension Version | End of Life | Magento | PHP |
40-
|-------------------|-------------|------------------------------|----------------------------------------|
38+
| Extension Version | End of Life | Magento | PHP |
39+
|-------------------|-------------|--------------------|----------------------------------------|
4140
| v3.7.x | 10/10/2023 | `~2.3.7\|\|~2.4.5\|\|~2.4.6` | `~7.3.0\|\|~7.4.0\|\|~8.1.0\|\|~8.2.0` |
42-
| v3.8.x | 3/8/2023 | `~2.4.5\|\|~2.4.6` | `~7.4.0\|\|~8.1.0\|\|~8.2.0` |
43-
| v3.9.x | 10/13/2023 | `~2.4.5\|\|~2.4.6` | `~7.4.0\|\|~8.1.0\|\|~8.2.0` |
44-
| v3.10.x | 12/12/2023 | `~2.4.6` | `~8.1.0\|\|~8.2.0` |
45-
| v3.11.x | 1/26/2024 | `~2.4.6` | `~8.1.0\|\|~8.2.0` |
46-
| v3.12.x | 8/2/2024 | `~2.4.6` | `~8.1.0\|\|~8.2.0` |
47-
| v3.13.x | N/A | `~2.4.6` | `~8.1.0\|\|~8.2.0` |
48-
| v3.14.x | N/A | `~2.4.6\|\|~2.4.7` | `~8.1.0\|\|~8.2.0\|\|~8.3.0` |
49-
| v3.15.x | N/A | `~2.4.6\|\|~2.4.7` | `~8.1.0\|\|~8.2.0\|\|~8.3.0` |
41+
| v3.8.x | 3/8/2023 | `~2.4.5\|\|~2.4.6` | `~7.4.0\|\|~8.1.0\|\|~8.2.0` |
42+
| v3.9.x | 10/13/2023 | `~2.4.5\|\|~2.4.6` | `~7.4.0\|\|~8.1.0\|\|~8.2.0` |
43+
| v3.10.x | 12/12/2023 | `~2.4.6` | `~8.1.0\|\|~8.2.0` |
44+
| v3.11.x | 1/26/2024 | `~2.4.6` | `~8.1.0\|\|~8.2.0` |
45+
| v3.12.x | 8/2/2024 | `~2.4.6` | `~8.1.0\|\|~8.2.0` |
46+
| v3.13.x | N/A | `~2.4.6` | `~8.1.0\|\|~8.2.0` |
47+
| v3.14.x | N/A | `~2.4.6\|\|~2.4.7` | `~8.1.0\|\|~8.2.0\|\|~8.3.0` |
48+
| v3.15.x | N/A | `~2.4.6\|\|~2.4.7` | `~8.1.0\|\|~8.2.0\|\|~8.3.0` |
49+
| v3.16.x | N/A | `~2.4.6\|\|~2.4.7` | `~8.1.0\|\|~8.2.0\|\|~8.3.0` |
5050

5151
## Documentation
5252

Test/Unit/Logger/AlgoliaLoggerTest.php

Lines changed: 0 additions & 61 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
namespace Algolia\AlgoliaSearch\Test\Unit\Logger\Handler;
4+
5+
use Magento\Framework\Logger\Handler\Base;
6+
use PHPUnit\Framework\TestCase;
7+
8+
abstract class AbstractHandlerTest extends TestCase
9+
{
10+
protected ?Base $handler = null;
11+
12+
/**
13+
* Monolog v3 uses LogRecord
14+
* v2 uses arrays only
15+
*/
16+
protected function makeLogRecord(int $level, string $message)
17+
{
18+
if (class_exists(\Monolog\LogRecord::class)) {
19+
// Monolog v3
20+
$levelEnum = $this->convertLevelToEnum($level);
21+
return new \Monolog\LogRecord(
22+
new \DateTimeImmutable(),
23+
'test',
24+
$levelEnum,
25+
$message
26+
);
27+
}
28+
29+
// Monolog v2
30+
return [
31+
'message' => $message,
32+
'level' => $level
33+
];
34+
}
35+
36+
protected function convertLevelToEnum(int $level): \Monolog\Level
37+
{
38+
if (class_exists(\Monolog\Level::class)) {
39+
return \Monolog\Level::from($level);
40+
}
41+
42+
throw new \RuntimeException('Monolog v3 Level enum not available');
43+
}
44+
45+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
namespace Algolia\AlgoliaSearch\Test\Unit\Logger\Handler;
4+
5+
use Algolia\AlgoliaSearch\Logger\Handler\AlgoliaLoggerHandler;
6+
use Magento\Framework\Filesystem\DriverInterface;
7+
8+
class AlgoliaLoggerHandlerTest extends AbstractHandlerTest
9+
{
10+
protected function setUp(): void
11+
{
12+
$this->handler = new AlgoliaLoggerHandler(
13+
$this->createMock(DriverInterface::class)
14+
);
15+
}
16+
17+
public function testAlgoliaHandlerLogsEverything(): void
18+
{
19+
$debugRecord = $this->makeLogRecord(
20+
\Monolog\Logger::DEBUG,
21+
'Should log'
22+
);
23+
24+
$infoRecord = $this->makeLogRecord(
25+
\Monolog\Logger::INFO,
26+
'Should log'
27+
);
28+
29+
$errorRecord = $this->makeLogRecord(
30+
\Monolog\Logger::ERROR,
31+
'Should log'
32+
);
33+
34+
$this->assertTrue($this->handler->isHandling($debugRecord), 'DEBUG should be handled');
35+
$this->assertTrue($this->handler->isHandling($infoRecord), 'INFO should be handled');
36+
$this->assertTrue($this->handler->isHandling($errorRecord), 'ERROR should be handled');
37+
}
38+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
namespace Algolia\AlgoliaSearch\Test\Unit\Logger\Handler;
4+
5+
use Algolia\AlgoliaSearch\Logger\Handler\SystemLoggerHandler;
6+
use Magento\Framework\Filesystem\DriverInterface;
7+
use Magento\Framework\Logger\Handler\Exception as ExceptionHandler;
8+
9+
class SystemLoggerHandlerTest extends AbstractHandlerTest
10+
{
11+
/**
12+
* @throws \Exception
13+
*/
14+
protected function setUp(): void
15+
{
16+
$this->handler = new SystemLoggerHandler(
17+
$this->createMock(DriverInterface::class),
18+
$this->createMock(ExceptionHandler::class),
19+
);
20+
}
21+
22+
public function testSystemHandlerFiltersBelowError(): void
23+
{
24+
$infoRecord = $this->makeLogRecord(
25+
\Monolog\Logger::INFO,
26+
'Should not log'
27+
);
28+
29+
$errorRecord = $this->makeLogRecord(
30+
\Monolog\Logger::ERROR,
31+
'Should log'
32+
);
33+
34+
$this->assertFalse($this->handler->isHandling($infoRecord), 'INFO should be ignored');
35+
$this->assertTrue($this->handler->isHandling($errorRecord), 'ERROR should be handled');
36+
}
37+
}

composer.json

Lines changed: 1 addition & 1 deletion
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.16.0-beta.1",
6+
"version": "3.16.0",
77
"require": {
88
"php": "~8.1|~8.2|~8.3",
99
"magento/framework": "~103.0",

etc/module.xml

Lines changed: 1 addition & 1 deletion
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.16.0-beta.1">
3+
<module name="Algolia_AlgoliaSearch" setup_version="3.16.0">
44
<sequence>
55
<module name="Magento_Theme"/>
66
<module name="Magento_Backend"/>

0 commit comments

Comments
 (0)