-
Notifications
You must be signed in to change notification settings - Fork 247
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
#207 - Move Qty product import processing to new stock item importer #211
Conversation
- is_in_stock is not required for import, add check to see if isset, use 0 if not
- Also removes unused delete interface from class declaration
@@ -778,6 +787,7 @@ public function __construct( | |||
Product\TaxClassProcessor $taxClassProcessor, | |||
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, | |||
\Magento\Catalog\Model\Product\Url $productUrl, | |||
StockItemImporterInterface $stockItemImporter, |
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.
currently adding required dependency will introduce Backward Incompatible changes.
It's better to do like we usually do to preserve constructor BC :
public function __construct(
\\old arguments
StockItemImporterInterface $stockItemImporter = null //add new dependency at the end of the dependencies list
) {
$this->stockItemImporter = $stockItemImporter ?: \Magento\Framework\App\ObjectManager::getInstance()->get(
StockItemImporterInterface::class
);
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.
- By not requiring stockItemInterface in construct
/** | ||
* Source Item Importer | ||
* | ||
* @var |
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 specify data type for @var
StockItemImporterInterface
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.
Good spot - fixed here
Description
Move Qty Importing to new Stock Item Importer, new extension point to allow for eventual move of product stock import logic to here.
Fixed Issues (if relevant)
#207
Outstanding Tasks