Skip to content

Commit

Permalink
Merge pull request #13 from the-it-nerd/master
Browse files Browse the repository at this point in the history
Updating compatibility with ElasticSuite 2.11
  • Loading branch information
romainruaud committed Apr 13, 2023
2 parents 4460315 + b4e0d44 commit 5c7cf2b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
19 changes: 11 additions & 8 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
namespace Smile\ElasticsuiteSharedCatalog\Helper;

use Magento\Framework\App\Helper\AbstractHelper;
use Magento\Framework\App\Helper\Context;
use Magento\Framework\Module\Manager as ModuleManager;

/**
* ElasticSuite Shared Catalog Helper
Expand All @@ -26,20 +28,21 @@
class Data extends AbstractHelper
{
/**
* @var \Magento\Framework\Module\Manager
* @var ModuleManager
*/
private $moduleManager;
private ModuleManager $moduleManager;

/**
* Constructor.
*
* @param \Magento\Framework\App\Helper\Context $context Context.
* @param \Magento\Framework\Module\Manager $moduleManager Module manager.
* @param Context $context Context.
* @param ModuleManager $moduleManager Module manager.
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Framework\Module\Manager $moduleManager
) {
Context $context,
ModuleManager $moduleManager
)
{
parent::__construct($context);
$this->moduleManager = $moduleManager;
}
Expand All @@ -49,7 +52,7 @@ public function __construct(
*
* @return boolean
*/
public function isEnabled()
public function isEnabled(): bool
{
return $this->moduleManager->isEnabled("Magento_SharedCatalog");
}
Expand Down
9 changes: 6 additions & 3 deletions Model/Product/Indexer/Fulltext/Datasource/SharedCatalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,23 @@ class SharedCatalog implements DatasourceInterface
/**
* @var SharedCatalogHelper
*/
private $helper;
private SharedCatalogHelper $helper;

/**
* @var ResourceModel
*/
private $resourceModel;
private ResourceModel $resourceModel;

/**
* Constructor.
*
* @param SharedCatalogHelper $helper ElasticSuite Shared Catalog helper.
* @param ResourceModel $resourceModel Resource model.
*/
public function __construct(SharedCatalogHelper $helper, ResourceModel $resourceModel)
public function __construct(
SharedCatalogHelper $helper,
ResourceModel $resourceModel
)
{
$this->helper = $helper;
$this->resourceModel = $resourceModel;
Expand Down
12 changes: 6 additions & 6 deletions Model/Product/Search/Request/Container/Filter/CustomerGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,32 @@ class CustomerGroup implements FilterInterface
/**
* @var QueryFactory
*/
private $queryFactory;
private QueryFactory $queryFactory;

/**
* @var CompanyContext
*/
private $companyContext;
private CompanyContext $companyContext;

/**
* @var Config
*/
private $config;
private Config $config;

/**
* @var CustomerGroupManagement
*/
private $customerGroupManagement;
private CustomerGroupManagement $customerGroupManagement;

/**
* @var StoreManagerInterface
*/
private $storeManager;
private StoreManagerInterface $storeManager;

/**
* @var boolean[]
*/
private $sharedCatalogStatusByGroup = [];
private array $sharedCatalogStatusByGroup = [];

/**
* Customer group filter constructor.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"magento/module-catalog-search": ">=101.0.0",
"magento/module-shared-catalog": ">=100.1.0",
"magento/magento-composer-installer": "*",
"smile/elasticsuite": "~2.10.0"
"smile/elasticsuite": "~2.11.0"
},
"require-dev": {
"smile/magento2-smilelab-quality-suite": "^1.1.0"
Expand Down

0 comments on commit 5c7cf2b

Please sign in to comment.