Skip to content

Commit f25d5eb

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-69967' into 2.2-develop-pr9
2 parents 35193b9 + 57cd1b3 commit f25d5eb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class StockItemRepository implements StockItemRepositoryInterface
7777

7878
/**
7979
* @var Processor
80+
* @deprecated
8081
*/
8182
protected $indexProcessor;
8283

@@ -181,8 +182,6 @@ public function save(\Magento\CatalogInventory\Api\Data\StockItemInterface $stoc
181182
$stockItem->setStockId($stockItem->getStockId());
182183

183184
$this->resource->save($stockItem);
184-
185-
$this->indexProcessor->reindexRow($stockItem->getProductId());
186185
} catch (\Exception $exception) {
187186
throw new CouldNotSaveException(__('Unable to save Stock Item'), $exception);
188187
}

app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/StockItemRepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public function testSave()
304304
->method('save')
305305
->with($this->stockItemMock)
306306
->willReturnSelf();
307-
$this->indexProcessorMock->expects($this->once())->method('reindexRow')->with($productId);
307+
$this->indexProcessorMock->expects($this->never())->method('reindexRow')->with($productId);
308308

309309
$this->assertEquals($this->stockItemMock, $this->model->save($this->stockItemMock));
310310
}

0 commit comments

Comments
 (0)