Skip to content

Commit a7f930a

Browse files
authored
ENGCOM-4502: MSI: Add deprecation message to CatalogInventory SPIs #21774
2 parents bfce73c + 1a5e412 commit a7f930a

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

app/code/Magento/CatalogInventory/Model/Spi/StockRegistryProviderInterface.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,33 @@
77

88
/**
99
* Interface StockRegistryProviderInterface
10+
*
11+
* @deprecated 2.3.0 Replaced with Multi Source Inventory
12+
* @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
13+
* @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
1014
*/
1115
interface StockRegistryProviderInterface
1216
{
1317
/**
18+
* Get stock.
19+
*
1420
* @param int $scopeId
1521
* @return \Magento\CatalogInventory\Api\Data\StockInterface
1622
*/
1723
public function getStock($scopeId);
1824

1925
/**
26+
* Get stock item.
27+
*
2028
* @param int $productId
2129
* @param int $scopeId
2230
* @return \Magento\CatalogInventory\Api\Data\StockItemInterface
2331
*/
2432
public function getStockItem($productId, $scopeId);
2533

2634
/**
35+
* Get stock status.
36+
*
2737
* @param int $productId
2838
* @param int $scopeId
2939
* @return \Magento\CatalogInventory\Api\Data\StockStatusInterface

app/code/Magento/CatalogInventory/Model/Spi/StockStateProviderInterface.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,32 @@
99

1010
/**
1111
* Interface StockStateProviderInterface
12+
*
13+
* @deprecated 2.3.0 Replaced with Multi Source Inventory
14+
* @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
15+
* @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
1216
*/
1317
interface StockStateProviderInterface
1418
{
1519
/**
20+
* Verify stock.
21+
*
1622
* @param StockItemInterface $stockItem
1723
* @return bool
1824
*/
1925
public function verifyStock(StockItemInterface $stockItem);
2026

2127
/**
28+
* Verify notification.
29+
*
2230
* @param StockItemInterface $stockItem
2331
* @return bool
2432
*/
2533
public function verifyNotification(StockItemInterface $stockItem);
2634

2735
/**
36+
* Validate quote qty.
37+
*
2838
* @param StockItemInterface $stockItem
2939
* @param int|float $itemQty
3040
* @param int|float $qtyToCheck
@@ -44,8 +54,9 @@ public function checkQuoteItemQty(StockItemInterface $stockItem, $itemQty, $qtyT
4454
public function checkQty(StockItemInterface $stockItem, $qty);
4555

4656
/**
47-
* Returns suggested qty that satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions
48-
* or original qty if such value does not exist
57+
* Returns suggested qty or original qty if such value does not exist.
58+
*
59+
* Suggested qty satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions.
4960
*
5061
* @param StockItemInterface $stockItem
5162
* @param int|float $qty
@@ -54,6 +65,8 @@ public function checkQty(StockItemInterface $stockItem, $qty);
5465
public function suggestQty(StockItemInterface $stockItem, $qty);
5566

5667
/**
68+
* Check qty increments.
69+
*
5770
* @param StockItemInterface $stockItem
5871
* @param int|float $qty
5972
* @return \Magento\Framework\DataObject

0 commit comments

Comments
 (0)