From 327cb7ecfbe784804cdf0f4edfe24ab154ea7f54 Mon Sep 17 00:00:00 2001 From: josh-carter Date: Sat, 18 Nov 2017 17:10:47 +0100 Subject: [PATCH 01/14] Add StockImporterInterface extension point to core product import --- .../Model/Import/Product.php | 14 +++++++++++ .../Model/StockItemImporterInterface.php | 25 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index a0f1e25cf651..57251931d849 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -6,7 +6,10 @@ namespace Magento\CatalogImportExport\Model\Import; use Magento\Catalog\Model\Product\Visibility; +use Magento\CatalogImportExport\Model\StockItemImporterInterface; use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface; +use Magento\Framework\Api\SearchCriteriaBuilderFactory; +use Magento\Framework\Api\SearchCriteriaInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ObjectManager; use Magento\Framework\Model\ResourceModel\Db\ObjectRelationProcessor; @@ -698,6 +701,13 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity */ private $catalogConfig; + /** + * Source Item Importer + * + * @var + */ + private $stockItemImporter; + /** * @param \Magento\Framework\Json\Helper\Data $jsonHelper * @param \Magento\ImportExport\Helper\Data $importExportData @@ -737,6 +747,7 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity * @param array $data * @param array $dateAttrCodes * @param CatalogConfig $catalogConfig + * @param StockItemImporterInterface $stockItemImporter * @throws \Magento\Framework\Exception\LocalizedException * * @SuppressWarnings(PHPMD.ExcessiveParameterList) @@ -778,6 +789,7 @@ public function __construct( Product\TaxClassProcessor $taxClassProcessor, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Catalog\Model\Product\Url $productUrl, + StockItemImporterInterface $stockItemImporter, array $data = [], array $dateAttrCodes = [], CatalogConfig $catalogConfig = null @@ -813,6 +825,7 @@ public function __construct( $this->dateAttrCodes = array_merge($this->dateAttrCodes, $dateAttrCodes); $this->catalogConfig = $catalogConfig ?: \Magento\Framework\App\ObjectManager::getInstance() ->get(CatalogConfig::class); + $this->stockItemImporter = $stockItemImporter; parent::__construct( $jsonHelper, @@ -2261,6 +2274,7 @@ protected function _saveStockItem() // Insert rows if (!empty($stockData)) { $this->_connection->insertOnDuplicate($entityTable, array_values($stockData)); + $this->stockItemImporter->import($bunch); } $this->reindexProducts($productIdsToReindex); diff --git a/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php b/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php new file mode 100644 index 000000000000..9540f5afaa16 --- /dev/null +++ b/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php @@ -0,0 +1,25 @@ + Date: Sat, 18 Nov 2017 17:12:57 +0100 Subject: [PATCH 02/14] #207 - Inject Preference for StockItemImportyer Handles default source Qty import --- .../Model/StockItemImporter.php | 84 +++++++++++++++++++ .../Magento/InventoryImportExport/etc/di.xml | 3 + 2 files changed, 87 insertions(+) create mode 100644 app/code/Magento/InventoryImportExport/Model/StockItemImporter.php diff --git a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php new file mode 100644 index 000000000000..5e3d28312a66 --- /dev/null +++ b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php @@ -0,0 +1,84 @@ +sourceItemsSave = $sourceItemsSave; + $this->sourceItemFactory = $sourceItemFactory; + $this->defaultSource = $defaultSourceProvider; + } + + /** + * Handle Import of Stock Item Data + * + * @param array $stockData + * @return void + */ + public function import(array $stockData): void + { + $sourceItems = []; + foreach ($stockData as $stockDatum) { + if (isset($stockDatum[Product::COL_SKU])) { + $sku = $stockDatum[Product::COL_SKU]; + $sourceItem = $this->sourceItemFactory->create(); + $sourceItem->setSku($sku); + $sourceItem->setSourceId($this->defaultSource->getId()); + $sourceItem->setQuantity($stockDatum['qty']); + $sourceItem->setStatus($stockDatum['is_in_stock']); + $sourceItems[] = $sourceItem; + } + } + if (count($sourceItems) > 0) { + /** Magento\Inventory\Model\SourceItem[] $sourceItems */ + $this->sourceItemsSave->execute($sourceItems); + } + } +} diff --git a/app/code/Magento/InventoryImportExport/etc/di.xml b/app/code/Magento/InventoryImportExport/etc/di.xml index 9fca572cce16..fc773e6f5278 100644 --- a/app/code/Magento/InventoryImportExport/etc/di.xml +++ b/app/code/Magento/InventoryImportExport/etc/di.xml @@ -28,6 +28,9 @@ + + + From 675b192968805bfe13cc396ad328d4a4e1b13e97 Mon Sep 17 00:00:00 2001 From: josh-carter Date: Sat, 18 Nov 2017 17:15:45 +0100 Subject: [PATCH 03/14] Remove Search criteria classes --- app/code/Magento/CatalogImportExport/Model/Import/Product.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index 57251931d849..da7a8a643a80 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -8,8 +8,6 @@ use Magento\Catalog\Model\Product\Visibility; use Magento\CatalogImportExport\Model\StockItemImporterInterface; use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface; -use Magento\Framework\Api\SearchCriteriaBuilderFactory; -use Magento\Framework\Api\SearchCriteriaInterface; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\ObjectManager; use Magento\Framework\Model\ResourceModel\Db\ObjectRelationProcessor; From 66ee87420b61f7bcfc5ef19311d328aa36be386e Mon Sep 17 00:00:00 2001 From: josh-carter Date: Sun, 19 Nov 2017 13:34:49 +0000 Subject: [PATCH 04/14] Remove confusing doc tag --- .../CatalogImportExport/Model/StockItemImporterInterface.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php b/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php index 9540f5afaa16..a45a54850f70 100644 --- a/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php +++ b/app/code/Magento/CatalogImportExport/Model/StockItemImporterInterface.php @@ -9,7 +9,6 @@ /** * Interface StockItemImporterInterface - * @package Magento\CatalogImportExport\Api * * @api */ From a751e98a665f4659e5742aefacf5b22369c0e711 Mon Sep 17 00:00:00 2001 From: josh-carter Date: Sun, 19 Nov 2017 13:35:32 +0000 Subject: [PATCH 05/14] Update file doc with Magento Copyright lines --- .../InventoryImportExport/Model/StockItemImporter.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php index 5e3d28312a66..769ab2e6324a 100644 --- a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php +++ b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php @@ -1,9 +1,7 @@ Date: Sun, 19 Nov 2017 13:35:59 +0000 Subject: [PATCH 06/14] Remove unused class declaration --- .../Magento/InventoryImportExport/Model/StockItemImporter.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php index 769ab2e6324a..223ddebd17f8 100644 --- a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php +++ b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php @@ -10,7 +10,6 @@ use Magento\CatalogImportExport\Model\StockItemImporterInterface; use Magento\CatalogImportExport\Model\Import\Product; use Magento\Inventory\Model\SourceItemFactory; -use Magento\InventoryApi\Api\Data\SourceItemInterface; use Magento\InventoryApi\Api\SourceItemsSaveInterface; use Magento\InventoryCatalog\Api\DefaultSourceProviderInterface; From b06e080b97614b3be48204852b2cee4ffdc92986 Mon Sep 17 00:00:00 2001 From: josh-carter Date: Sun, 19 Nov 2017 13:36:57 +0000 Subject: [PATCH 07/14] Remove php ^7.1 return type hint --- .../Magento/InventoryImportExport/Model/StockItemImporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php index 223ddebd17f8..80c0af9e6114 100644 --- a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php +++ b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php @@ -59,7 +59,7 @@ public function __construct( * @param array $stockData * @return void */ - public function import(array $stockData): void + public function import(array $stockData) { $sourceItems = []; foreach ($stockData as $stockDatum) { From 90fb91d61789e0356b34527c7228d8689840f7c1 Mon Sep 17 00:00:00 2001 From: josh-carter Date: Sun, 19 Nov 2017 13:38:18 +0000 Subject: [PATCH 08/14] Fix Bundle Import integration test throwing undefined index - is_in_stock is not required for import, add check to see if isset, use 0 if not --- .../InventoryImportExport/Model/StockItemImporter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php index 80c0af9e6114..bbc6b4bd26e0 100644 --- a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php +++ b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php @@ -64,12 +64,12 @@ public function import(array $stockData) $sourceItems = []; foreach ($stockData as $stockDatum) { if (isset($stockDatum[Product::COL_SKU])) { - $sku = $stockDatum[Product::COL_SKU]; + $inStock = (isset($stockDatum['is_in_stock'])) ? $stockDatum['is_in_stock'] : 0; $sourceItem = $this->sourceItemFactory->create(); - $sourceItem->setSku($sku); + $sourceItem->setSku($stockDatum[Product::COL_SKU]); $sourceItem->setSourceId($this->defaultSource->getId()); $sourceItem->setQuantity($stockDatum['qty']); - $sourceItem->setStatus($stockDatum['is_in_stock']); + $sourceItem->setStatus($inStock); $sourceItems[] = $sourceItem; } } From 716d705079e61990da21e2134147650e3d2453f2 Mon Sep 17 00:00:00 2001 From: josh-carter Date: Mon, 20 Nov 2017 08:52:27 +0000 Subject: [PATCH 09/14] Add Check for if qty isset in import function --- .../Magento/InventoryImportExport/Model/StockItemImporter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php index bbc6b4bd26e0..2bd49881f24a 100644 --- a/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php +++ b/app/code/Magento/InventoryImportExport/Model/StockItemImporter.php @@ -65,10 +65,11 @@ public function import(array $stockData) foreach ($stockData as $stockDatum) { if (isset($stockDatum[Product::COL_SKU])) { $inStock = (isset($stockDatum['is_in_stock'])) ? $stockDatum['is_in_stock'] : 0; + $qty = (isset($stockDatum['qty'])) ? $stockDatum['qty'] : 0; $sourceItem = $this->sourceItemFactory->create(); $sourceItem->setSku($stockDatum[Product::COL_SKU]); $sourceItem->setSourceId($this->defaultSource->getId()); - $sourceItem->setQuantity($stockDatum['qty']); + $sourceItem->setQuantity($qty); $sourceItem->setStatus($inStock); $sourceItems[] = $sourceItem; } From 2cd90384736f02216503d96a9c7a8fc941de8d33 Mon Sep 17 00:00:00 2001 From: josh-carter Date: Tue, 21 Nov 2017 10:37:05 +0000 Subject: [PATCH 10/14] Integration Test for StockItemImporter --- .../Model/StockItemImporterTest.php | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php diff --git a/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php b/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php new file mode 100644 index 000000000000..9b1027bcd674 --- /dev/null +++ b/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php @@ -0,0 +1,114 @@ +defaultSourceProviderInterface = Bootstrap::getObjectManager()->create(DefaultSourceProviderInterface::class); + $this->importerInterface = Bootstrap::getObjectManager()->create(StockItemImporterInterface::class); + $this->searchCriteriaBuilderFactory = Bootstrap::getObjectManager()->create(SearchCriteriaBuilderFactory::class); + $this->sourceItemRepositoryInterface = Bootstrap::getObjectManager()->create(SourceItemRepositoryInterface::class); + } + + /** + * Tests Source Item Import of default source + * + * @magentoDbIsolation enabled + */ + public function testSourceItemImportWithDefaultSource() + { + $stockData = [ + 'sku' => 'SKU-1', + 'qty' => 1, + 'is_in_stock' => SourceItemInterface::STATUS_IN_STOCK + ]; + + $this->importerInterface->import([$stockData]); + + $compareData = $this->buildDataArray($this->getSourceItemList()->getItems()); + $expectedData = [ + SourceItemInterface::SKU => $stockData['sku'], + SourceItemInterface::QUANTITY => '1.0000', + SourceItemInterface::SOURCE_ID => (string) $this->defaultSourceProviderInterface->getId(), + SourceItemInterface::STATUS => (string) SourceItemInterface::STATUS_IN_STOCK + ]; + + $this->assertArrayHasKey('SKU-1', $compareData); + $this->assertSame($expectedData, $compareData['SKU-1']); + } + + /** + * Get List of Source Items which match SKU and Source ID of dummy data + * + * @return \Magento\InventoryApi\Api\Data\SourceItemSearchResultsInterface + */ + private function getSourceItemList() + { + /** @var SearchCriteriaBuilder $searchCriteria */ + $searchCriteriaBuilder = $this->searchCriteriaBuilderFactory->create(); + $searchCriteriaBuilder->addFilter(SourceItemInterface::SKU, 'SKU-1'); + $searchCriteriaBuilder->addFilter(SourceItemInterface::SOURCE_ID, $this->defaultSourceProviderInterface->getId()); + /** @var SearchCriteria $searchCriteria */ + $searchCriteria = $searchCriteriaBuilder->create(); + return $this->sourceItemRepositoryInterface->getList($searchCriteria); + } + + /** + * @param SourceItemInterface[] $sourceItems + * @return array + */ + private function buildDataArray(array $sourceItems) + { + $comparableArray = []; + foreach ($sourceItems as $sourceItem) { + $comparableArray[$sourceItem->getSku()] = [ + SourceItemInterface::SKU => $sourceItem->getSku(), + SourceItemInterface::QUANTITY => $sourceItem->getQuantity(), + SourceItemInterface::SOURCE_ID => $sourceItem->getSourceId(), + SourceItemInterface::STATUS => $sourceItem->getStatus() + ]; + } + return $comparableArray; + } +} From 5a386bc24bb1f009984744bbb87c97fe5470e9c6 Mon Sep 17 00:00:00 2001 From: josh-carter Date: Tue, 21 Nov 2017 11:00:49 +0000 Subject: [PATCH 11/14] Fix static test line characters check - Also removes unused delete interface from class declaration --- .../Model/StockItemImporterTest.php | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php b/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php index 9b1027bcd674..df6715f976ff 100644 --- a/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php +++ b/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php @@ -13,7 +13,6 @@ use Magento\Framework\Api\SearchCriteriaBuilderFactory; use Magento\InventoryApi\Api\Data\SourceItemInterface; use Magento\InventoryApi\Api\SourceItemRepositoryInterface; -use Magento\InventoryApi\Api\SourceItemsDeleteInterface; use Magento\InventoryCatalog\Api\DefaultSourceProviderInterface; use Magento\TestFramework\Helper\Bootstrap; use PHPUnit\Framework\TestCase; @@ -45,10 +44,18 @@ class StockItemImporterTest extends TestCase */ public function setUp() { - $this->defaultSourceProviderInterface = Bootstrap::getObjectManager()->create(DefaultSourceProviderInterface::class); - $this->importerInterface = Bootstrap::getObjectManager()->create(StockItemImporterInterface::class); - $this->searchCriteriaBuilderFactory = Bootstrap::getObjectManager()->create(SearchCriteriaBuilderFactory::class); - $this->sourceItemRepositoryInterface = Bootstrap::getObjectManager()->create(SourceItemRepositoryInterface::class); + $this->defaultSourceProviderInterface = Bootstrap::getObjectManager()->create( + DefaultSourceProviderInterface::class + ); + $this->importerInterface = Bootstrap::getObjectManager()->create( + StockItemImporterInterface::class + ); + $this->searchCriteriaBuilderFactory = Bootstrap::getObjectManager()->create( + SearchCriteriaBuilderFactory::class + ); + $this->sourceItemRepositoryInterface = Bootstrap::getObjectManager()->create( + SourceItemRepositoryInterface::class + ); } /** @@ -87,8 +94,17 @@ private function getSourceItemList() { /** @var SearchCriteriaBuilder $searchCriteria */ $searchCriteriaBuilder = $this->searchCriteriaBuilderFactory->create(); - $searchCriteriaBuilder->addFilter(SourceItemInterface::SKU, 'SKU-1'); - $searchCriteriaBuilder->addFilter(SourceItemInterface::SOURCE_ID, $this->defaultSourceProviderInterface->getId()); + + $searchCriteriaBuilder->addFilter( + SourceItemInterface::SKU, + 'SKU-1' + ); + + $searchCriteriaBuilder->addFilter( + SourceItemInterface::SOURCE_ID, + $this->defaultSourceProviderInterface->getId() + ); + /** @var SearchCriteria $searchCriteria */ $searchCriteria = $searchCriteriaBuilder->create(); return $this->sourceItemRepositoryInterface->getList($searchCriteria); From cebb2f83c132a415c176266747e244d0ae97e26c Mon Sep 17 00:00:00 2001 From: josh-carter Date: Tue, 21 Nov 2017 11:05:30 +0000 Subject: [PATCH 12/14] Move object create() to get() incase already available in cache --- .../Test/Integration/Model/StockItemImporterTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php b/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php index df6715f976ff..18749cf035a5 100644 --- a/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php +++ b/app/code/Magento/InventoryImportExport/Test/Integration/Model/StockItemImporterTest.php @@ -44,16 +44,16 @@ class StockItemImporterTest extends TestCase */ public function setUp() { - $this->defaultSourceProviderInterface = Bootstrap::getObjectManager()->create( + $this->defaultSourceProviderInterface = Bootstrap::getObjectManager()->get( DefaultSourceProviderInterface::class ); - $this->importerInterface = Bootstrap::getObjectManager()->create( + $this->importerInterface = Bootstrap::getObjectManager()->get( StockItemImporterInterface::class ); - $this->searchCriteriaBuilderFactory = Bootstrap::getObjectManager()->create( + $this->searchCriteriaBuilderFactory = Bootstrap::getObjectManager()->get( SearchCriteriaBuilderFactory::class ); - $this->sourceItemRepositoryInterface = Bootstrap::getObjectManager()->create( + $this->sourceItemRepositoryInterface = Bootstrap::getObjectManager()->get( SourceItemRepositoryInterface::class ); } From 1af449357e08c0656ce825286d587f99bb17f020 Mon Sep 17 00:00:00 2001 From: josh-carter Date: Tue, 21 Nov 2017 15:01:42 +0000 Subject: [PATCH 13/14] Fix Backwards Compatibility - By not requiring stockItemInterface in construct --- .../Magento/CatalogImportExport/Model/Import/Product.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index da7a8a643a80..bf6ee3864ab5 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -787,10 +787,10 @@ public function __construct( Product\TaxClassProcessor $taxClassProcessor, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Catalog\Model\Product\Url $productUrl, - StockItemImporterInterface $stockItemImporter, array $data = [], array $dateAttrCodes = [], - CatalogConfig $catalogConfig = null + CatalogConfig $catalogConfig = null, + StockItemImporterInterface $stockItemImporter = null ) { $this->_eventManager = $eventManager; $this->stockRegistry = $stockRegistry; @@ -823,7 +823,8 @@ public function __construct( $this->dateAttrCodes = array_merge($this->dateAttrCodes, $dateAttrCodes); $this->catalogConfig = $catalogConfig ?: \Magento\Framework\App\ObjectManager::getInstance() ->get(CatalogConfig::class); - $this->stockItemImporter = $stockItemImporter; + $this->stockItemImporter = $stockItemImporter ?: \Magento\Framework\App\ObjectManager::getInstance() + ->get(StockItemImporterInterface::class); parent::__construct( $jsonHelper, From 290d9193ac1a21423b8a36fad8c3c8115d0ff502 Mon Sep 17 00:00:00 2001 From: josh-carter Date: Tue, 21 Nov 2017 15:57:44 +0000 Subject: [PATCH 14/14] Add data type in PHP Doc for StockItemImporter variable --- app/code/Magento/CatalogImportExport/Model/Import/Product.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/CatalogImportExport/Model/Import/Product.php b/app/code/Magento/CatalogImportExport/Model/Import/Product.php index bf6ee3864ab5..cbdc4c5c2bca 100644 --- a/app/code/Magento/CatalogImportExport/Model/Import/Product.php +++ b/app/code/Magento/CatalogImportExport/Model/Import/Product.php @@ -700,9 +700,9 @@ class Product extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity private $catalogConfig; /** - * Source Item Importer + * Stock Item Importer * - * @var + * @var StockItemImporterInterface $stockItemImporter */ private $stockItemImporter;