Skip to content
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

MSI: Add deprecation message to CatalogInventory SPIs #21774

Merged
merged 2 commits into from
Mar 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,33 @@

/**
* Interface StockRegistryProviderInterface
*
* @deprecated 2.3.0 Replaced with Multi Source Inventory
* @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
* @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
*/
interface StockRegistryProviderInterface
{
/**
* Get stock.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that against DRY? I mean - the method name is descriptive enough.

*
* @param int $scopeId
* @return \Magento\CatalogInventory\Api\Data\StockInterface
*/
public function getStock($scopeId);

/**
* Get stock item.
*
* @param int $productId
* @param int $scopeId
* @return \Magento\CatalogInventory\Api\Data\StockItemInterface
*/
public function getStockItem($productId, $scopeId);

/**
* Get stock status.
*
* @param int $productId
* @param int $scopeId
* @return \Magento\CatalogInventory\Api\Data\StockStatusInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,32 @@

/**
* Interface StockStateProviderInterface
*
* @deprecated 2.3.0 Replaced with Multi Source Inventory
* @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
* @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
*/
interface StockStateProviderInterface
{
/**
* Verify stock.
*
* @param StockItemInterface $stockItem
* @return bool
*/
public function verifyStock(StockItemInterface $stockItem);

/**
* Verify notification.
*
* @param StockItemInterface $stockItem
* @return bool
*/
public function verifyNotification(StockItemInterface $stockItem);

/**
* Validate quote qty.
*
* @param StockItemInterface $stockItem
* @param int|float $itemQty
* @param int|float $qtyToCheck
Expand All @@ -44,8 +54,9 @@ public function checkQuoteItemQty(StockItemInterface $stockItem, $itemQty, $qtyT
public function checkQty(StockItemInterface $stockItem, $qty);

/**
* Returns suggested qty that satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions
* or original qty if such value does not exist
* Returns suggested qty or original qty if such value does not exist.
*
* Suggested qty satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions.
*
* @param StockItemInterface $stockItem
* @param int|float $qty
Expand All @@ -54,6 +65,8 @@ public function checkQty(StockItemInterface $stockItem, $qty);
public function suggestQty(StockItemInterface $stockItem, $qty);

/**
* Check qty increments.
*
* @param StockItemInterface $stockItem
* @param int|float $qty
* @return \Magento\Framework\DataObject
Expand Down