-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indexation improvement #141
Conversation
…rce assignments have been changed
…MSI-invalidate-stockItem-indexes # Conflicts: # app/code/Magento/Inventory/Indexer/StockItem/Mview/Action.php # app/code/Magento/Inventory/Indexer/StockItem/StockItem.php # app/code/Magento/Inventory/etc/di.xml # app/code/Magento/Inventory/etc/mview.xml
…MSI-invalidate-stockItem-indexes # Conflicts: # app/code/Magento/Inventory/Indexer/StockItem/Mview/Action.php # app/code/Magento/Inventory/Indexer/StockItem/StockItem.php # app/code/Magento/Inventory/etc/di.xml # app/code/Magento/Inventory/etc/mview.xml
…rce assignments have been changed
…rce assignments have been changed
…rce assignments have been changed - add integration test for 3 indexers - change logic during testing - disable trigger for stock_item MVIEW by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good pls add only the static typing
@@ -0,0 +1,100 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add static PHP static typing to all files
declare(strict_types=1);
…rce assignments have been changed - add ability to hiding indexers
…MSI-invalidate-stockItem-indexes-v2 # Conflicts: # app/code/Magento/Inventory/Test/Integration/Indexer/IndexationTest.php
…rce assignments have been changed - revert ability to hiding indexers
-- refactoring
-- refactoring
-- refactoring
…ckItem-indexes-v2
-- refactoring
-- builds fixing
-- builds fixing
* @param array $conditions | ||
* @return \ArrayIterator|\Magento\Framework\DB\Select | ||
*/ | ||
private function prepareSelect($stockId, array $conditions = []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add type hints to the method declaration
@@ -76,12 +113,14 @@ public function getData(int $stockId, array $skuList = []): \ArrayIterator | |||
->where('stock_source_link.' . StockSourceLink::STOCK_ID . ' = ?', $stockId) | |||
->where('stock_source_link.' . StockSourceLink::SOURCE_ID . ' IN (?)', $sourceIds); | |||
|
|||
if (count($skuList) !== 0) { | |||
$select->where('source_item.' . SourceItemInterface::SKU . ' IN (?)', $skuList); | |||
if (!empty($conditions)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!empty
seems to be redundant here
* | ||
* @param int $stockId | ||
* @param array $conditions | ||
* @return \ArrayIterator|\Magento\Framework\DB\Select |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be much more "defensive" to return just one of the types
L3 pr 20210830
Create Plugins to invalidate StockItem indexes when Stock-to-Source assignments have been changed
Description
Create Plugins to invalidate StockItem indexes when Stock-to-Source assignments have been changed
Fixed Issues (if relevant)
Contribution checklist