diff --git a/.php_cs b/.php_cs index d9861ae51..ca0b4960d 100755 --- a/.php_cs +++ b/.php_cs @@ -1,7 +1,11 @@ getRules(); diff --git a/CHANGELOG.md b/CHANGELOG.md index bc4bfb0e7..4fae44fc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # CHANGE LOG +## 1.12.0 + +### FEATURES +- Algolia's facets backend rendering for Mysql Engine (#802) + +### UPDATES +- The extension no longer supports Magento 2.1 **BC Break** +- B2B Feature : add condition for allow catalog browsing for enabling and add count check for list() (#820) +- Updated enabled logic to pull from the config helper class (#820) +- Add ACL for Algolia Search configuration section (#829) +- Remove the isQueueActive() check for the product plugin (#830) +- Update get product images (#823) +- Remove Circle CI 2.1 check (#849) +- Add facet query rules management + dashboard warnings (#844) +- Update video links in admin (#850) +- Add new support page with tabs (#845) +- Adjust the extension to be ready for upcoming MSI optional support that will come through another extension. (#841) +- Making PHPCompatibility assess no funky <7.1 PHP is used in our project +- Magento Cloud Development setup teardown (#860) +- Add type checking tool configuration (#861) +- Add notice when users have access to C&C Analytics but they haven't turned it on (#867) + +### FIXES +- Add Store emulation for full category reindexing (#826) +- Category Product Updates for Update on Schedule (#819) +- Fix disabled autocomplete with active facet query rule) (#866) + ## 1.11.3 ### UPDATES diff --git a/Controller/Adminhtml/Landingpage/AbstractAction.php b/Controller/Adminhtml/Landingpage/AbstractAction.php index 5386b1573..70b92482a 100644 --- a/Controller/Adminhtml/Landingpage/AbstractAction.php +++ b/Controller/Adminhtml/Landingpage/AbstractAction.php @@ -86,7 +86,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request) return parent::dispatch($request); } - /** @return Algolia\AlgoliaSearch\Model\LandingPage */ + /** @return \Algolia\AlgoliaSearch\Model\LandingPage */ protected function initLandingPage() { $landingPageId = (int) $this->getRequest()->getParam('id'); diff --git a/Controller/Adminhtml/Query/AbstractAction.php b/Controller/Adminhtml/Query/AbstractAction.php index d9c599801..07d678e24 100644 --- a/Controller/Adminhtml/Query/AbstractAction.php +++ b/Controller/Adminhtml/Query/AbstractAction.php @@ -86,7 +86,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request) return parent::dispatch($request); } - /** @return Algolia\AlgoliaSearch\Model\Query */ + /** @return \Algolia\AlgoliaSearch\Model\Query */ protected function initQuery() { $queryId = (int) $this->getRequest()->getParam('id'); diff --git a/Controller/Adminhtml/Queue/AbstractAction.php b/Controller/Adminhtml/Queue/AbstractAction.php index 73b6b7f8a..f40a6620d 100644 --- a/Controller/Adminhtml/Queue/AbstractAction.php +++ b/Controller/Adminhtml/Queue/AbstractAction.php @@ -58,7 +58,7 @@ protected function _isAllowed() return $this->_authorization->isAllowed('Algolia_AlgoliaSearch::manage'); } - /** @return Algolia\AlgoliaSearch\Model */ + /** @return \Algolia\AlgoliaSearch\Model */ protected function initJob() { $jobId = (int) $this->getRequest()->getParam('id'); diff --git a/Helper/Entity/Product/AttributeHelper.php b/Helper/Entity/Product/AttributeHelper.php index d0b2c71f1..b3185f82f 100644 --- a/Helper/Entity/Product/AttributeHelper.php +++ b/Helper/Entity/Product/AttributeHelper.php @@ -24,7 +24,7 @@ public function __construct( /** * Get attribute info by attribute code and entity type * - * @param int|string|Mage\Eav\Model\Entity\Type $entityType + * @param int|string|\Magento\Eav\Model\Entity\Type $entityType * @param string $attributeCode * * @return \Magento\Eav\Model\Entity\Attribute diff --git a/Model/Indexer/CategoryObserver.php b/Model/Indexer/CategoryObserver.php index e2ba4621e..8b969aa0b 100755 --- a/Model/Indexer/CategoryObserver.php +++ b/Model/Indexer/CategoryObserver.php @@ -26,6 +26,7 @@ class CategoryObserver /** * CategoryObserver constructor. + * * @param IndexerRegistry $indexerRegistry * @param ConfigHelper $configHelper * @param ResourceConnection $resource @@ -53,7 +54,7 @@ public function afterSave( CategoryResourceModel $result, CategoryModel $category ) { - $categoryResource->addCommitCallback(function() use ($category) { + $categoryResource->addCommitCallback(function () use ($category) { $collectionIds = []; // To reduce the indexing operation for products, only update if these values have changed if ($category->getOrigData('name') !== $category->getData('name') @@ -92,7 +93,7 @@ public function afterDelete( CategoryResourceModel $result, CategoryModel $category ) { - $categoryResource->addCommitCallback(function() use ($category) { + $categoryResource->addCommitCallback(function () use ($category) { // mview should be able to handle the changes for catalog_category_product relationship if (!$this->indexer->isScheduled()) { /* we are using products position because getProductCollection() doesn't use correct store */ diff --git a/Model/Observer/CategoryMoveAfter.php b/Model/Observer/CategoryMoveAfter.php index acbe401df..6d01f0657 100644 --- a/Model/Observer/CategoryMoveAfter.php +++ b/Model/Observer/CategoryMoveAfter.php @@ -11,7 +11,6 @@ class CategoryMoveAfter implements ObserverInterface { - /** @var IndexerRegistry */ private $indexerRegistry; @@ -41,6 +40,7 @@ public function __construct( * is not able to process the products that need updating. * * @param Observer $observer + * * @return bool|void */ public function execute(Observer $observer) diff --git a/README.md b/README.md index a55e3c83a..cf3e4351e 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Algolia Search for Magento 2 ================== -![Latest version](https://img.shields.io/badge/latest-1.11.3-green.svg) +![Latest version](https://img.shields.io/badge/latest-1.12.0-green.svg) ![Magento 2](https://img.shields.io/badge/Magento-%3E=2.1-blue.svg) ![Magento 2](https://img.shields.io/badge/Magento-%3C%202.3.2-blue.svg) ![PHP >= 5.6.5](https://img.shields.io/badge/PHP-%3E=5.6-green.svg) diff --git a/composer.json b/composer.json index e5e119338..a2c4516c5 100755 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Algolia Search integration for Magento 2", "type": "magento2-module", "license": ["MIT"], - "version": "1.11.3", + "version": "1.12.0", "require": { "php": "~5.6.5|~7.0|~7.1|~7.2|~7.3", "magento/framework": "~100.1|~101.0|~102.0", diff --git a/dev/cloud/teardown.php b/dev/cloud/teardown.php index f86225a57..6903c9c39 100644 --- a/dev/cloud/teardown.php +++ b/dev/cloud/teardown.php @@ -1,6 +1,7 @@ - + diff --git a/phpstan.neon b/phpstan.neon index 9c3d9e4b2..61d28786d 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,8 +1,32 @@ parameters: level: 0 - excludes_analyse: - - %currentWorkingDirectory%/vendor/* - - %currentWorkingDirectory%/Test/* + paths: + - vendor/algolia/algoliasearch-magento-2/Adapter + - vendor/algolia/algoliasearch-magento-2/Api + - vendor/algolia/algoliasearch-magento-2/Block + - vendor/algolia/algoliasearch-magento-2/Controller + - vendor/algolia/algoliasearch-magento-2/DataProvider + - vendor/algolia/algoliasearch-magento-2/Exception + - vendor/algolia/algoliasearch-magento-2/Factory + - vendor/algolia/algoliasearch-magento-2/Helper + - vendor/algolia/algoliasearch-magento-2/Model + - vendor/algolia/algoliasearch-magento-2/Plugin + - vendor/algolia/algoliasearch-magento-2/Setup + - vendor/algolia/algoliasearch-magento-2/Test + - vendor/algolia/algoliasearch-magento-2/Ui + - vendor/algolia/algoliasearch-magento-2/ViewModel + - vendor/algolia/algoliasearch-magento-2/registration.php ignoreErrors: - '#(class|type) Magento\\\S*Factory#i' - '#(class|type) Algolia\\\S*Factory#i' + - '#Call to static method getObjectManager\(\) on an unknown class Magento\\TestFramework\\Helper\\Bootstrap.#' + - '#Access to an undefined property Algolia\\AlgoliaSearch\\Plugin\\BackendFilterRendererPlugin::\$storeManager.#' + - '#Method Algolia\\AlgoliaSearch\\Model\\Layer\\Filter\\Price::prepareData\(\) invoked with 3 parameters, 2 required.#' + - '#Method Algolia\\AlgoliaSearch\\Model\\Layer\\Filter\\Decimal::prepareData\(\) invoked with 3 parameters, 2 required.#' + - '#Parameter \$clientFactory of method Algolia\\AlgoliaSearch\\Helper\\AlgoliaHelper::__construct\(\) has invalid typehint type AlgoliaSearch\\ClientFactory.#' + - '#Return typehint of method Algolia\\AlgoliaSearch\\Controller\\Adminhtml\\Queue\\AbstractAction::initJob\(\) has invalid type Algolia\\AlgoliaSearch\\Model.#' + - '#Access to an undefined property Algolia\\AlgoliaSearch\\Controller\\Adminhtml\\Query\\Save::\$imageUploader.#' + - '#Undefined variable: \$data#' + - '#Access to an undefined property Algolia\\AlgoliaSearch\\Block\\Navigation\\Renderer\\SliderRenderer::\$filter.#' + - '#Access to an undefined property Algolia\\AlgoliaSearch\\Block\\Navigation\\Renderer\\DefaultRenderer::\$filter.#' + - '#Access to an undefined property Algolia\\AlgoliaSearch\\Block\\Navigation\\Renderer\\CategoryRenderer::\$filter.#'