Skip to content

Commit

Permalink
Merge pull request #758 from Nosto/release/5.4.0
Browse files Browse the repository at this point in the history
Release 5.4.0
  • Loading branch information
olsi-qose authored Dec 7, 2021
2 parents 6e188ce + aa65b68 commit 2461ae8
Show file tree
Hide file tree
Showing 30 changed files with 4,552 additions and 2,865 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '7.4'
tools: composer
extensions: ast, bcmath, gd
coverage: none
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '7.4'
tools: composer
extensions: ast, bcmath, gd
coverage: none
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '7.4'
tools: composer:v2, pecl
extensions: ast, bcmath, gd
coverage: none
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '7.4'
tools: composer:v2, pecl
extensions: bcmath, gd, pdo_mysql, zip, soap, ast
coverage: none
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '7.4'
tools: composer:v2, pecl
coverage: none
extensions: ast, bcmath, gd, pdo_mysql, zip, soap
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

### 5.4.0
* Add functionality to send disabled products to Nosto
* Add ttl for nosto_product_cache
* Refactor BuilderTrait into service classes

### 5.3.2
* Improve exception during product build by passing previos exception

Expand Down
2 changes: 2 additions & 0 deletions Controller/Export/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
/**
* Export base controller that all export controllers must extend.
*/
// @phan-suppress-next-next-line PhanDeprecatedClass - recommended to avoid code migration till 2.5.0
// https://community.magento.com/t5/Magento-DevBlog/Decomposition-of-Magento-Controllers/ba-p/430883
abstract class Base extends Action
{
const ID = 'id';
Expand Down
3 changes: 2 additions & 1 deletion Controller/Frontend/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
/*
* Controller class for handling cart restoration
*/

// @phan-suppress-next-next-line PhanDeprecatedClass - recommended to avoid code migration till 2.5.0
// https://community.magento.com/t5/Magento-DevBlog/Decomposition-of-Magento-Controllers/ba-p/430883
class Cart extends Action
{
/**
Expand Down
4 changes: 3 additions & 1 deletion Controller/Oauth/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
use Nosto\Tagging\Model\Meta\Oauth\Builder as NostoOauthBuilder;
use Nosto\Types\Signup\AccountInterface;

// @phan-suppress-next-next-line PhanDeprecatedClass - recommended to avoid code migration till 2.5.0
// https://community.magento.com/t5/Magento-DevBlog/Decomposition-of-Magento-Controllers/ba-p/430883
class Index extends Action
{
use OauthTrait;
Expand Down Expand Up @@ -156,7 +158,7 @@ public function save(AccountInterface $account)
) {
throw new NostoException(
sprintf(
'This account is already being used by "%s".
'This account is already being used by "%s".
Please create a new account for each store view',
$store->getName()
)
Expand Down
16 changes: 16 additions & 0 deletions Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ class Data extends AbstractHelper
*/
const XML_PATH_INDEXER_MEMORY = 'nosto/flags/indexer_memory';

/**
* Path to the configuration object that stores the preference for indexing disabled products
*/
const XML_PATH_INDEX_DISABLED_PRODUCTS = 'nosto/flags/indexer_disabled_products';

/*
* Path to the configuration object for tagging the date a product has beed added to Magento's catalog
*/
Expand Down Expand Up @@ -460,6 +465,17 @@ public function getIndexerMemory(StoreInterface $store = null)
return $this->getStoreConfig(self::XML_PATH_INDEXER_MEMORY, $store);
}

/**
* Returns maximum percentage of PHP available memory that indexer should use
*
* @param StoreInterface|null $store the store model or null.
* @return bool the configuration value
*/
public function canIndexDisabledProducts(StoreInterface $store = null)
{
return $this->getStoreConfig(self::XML_PATH_INDEX_DISABLED_PRODUCTS, $store);
}

/**
* Returns on/off setting for tagging product's date published
*
Expand Down
1 change: 1 addition & 0 deletions Model/Email/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function __construct(
*/
public function getNewsletterOptInForEmail($email)
{
// @phan-suppress-next-line PhanDeprecatedFunction
return $this->subscriber->loadByEmail($email);
}

Expand Down
2 changes: 1 addition & 1 deletion Model/Indexer/QueueIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function getCollection(Store $store, array $ids = []): ProductCollection
if (!empty($ids)) {
$this->productCollectionBuilder->withIds($ids);
} else {
$this->productCollectionBuilder->withDefaultVisibility();
$this->productCollectionBuilder->withDefaultVisibility($store);
}
return $this->productCollectionBuilder->build();
}
Expand Down
Loading

0 comments on commit 2461ae8

Please sign in to comment.