Skip to content

Commit 55416c2

Browse files
oliverweisenburgerSanyi
andauthored
IA-1241 (#56)
Co-authored-by: Sanyi <[email protected]>
1 parent de6175c commit 55416c2

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Release notes:
22
==============
33

4+
2.0.12
5+
-------
6+
* Fix
7+
* Fixing error during installation on Magento Cloud
8+
9+
410
2.0.11
511
-------
612
* Fix

Model/Api/InventoryApi.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
use Emartech\Emarsys\Api\Data\InventoryItemInterfaceFactory;
1313
use Emartech\Emarsys\Api\Data\InventoryItemItemInterfaceFactory;
1414
use Emartech\Emarsys\Api\InventoryApiInterface;
15+
use Magento\Framework\App\ObjectManager;
1516
use Magento\Framework\Model\ResourceModel\Iterator;
1617
use Magento\Inventory\Model\ResourceModel\SourceItem\Collection as SourceItemCollection;
17-
use Magento\Inventory\Model\ResourceModel\SourceItem\CollectionFactory as SourceItemCollectionFactory;
1818

1919
/**
2020
* Class InventoryApi
@@ -23,10 +23,6 @@
2323
*/
2424
class InventoryApi implements InventoryApiInterface
2525
{
26-
/**
27-
* @var SourceItemCollectionFactory
28-
*/
29-
private $sourceItemCollectionFactory;
3026

3127
/**
3228
* @var SourceItemCollection
@@ -61,20 +57,17 @@ class InventoryApi implements InventoryApiInterface
6157
/**
6258
* InventoryApi constructor.
6359
*
64-
* @param SourceItemCollectionFactory $sourceItemCollectionFactory
6560
* @param InventoryApiResponseInterfaceFactory $inventoryApiResponseFactory
6661
* @param InventoryItemInterfaceFactory $inventoryItemInterfaceFactory
6762
* @param InventoryItemItemInterfaceFactory $inventoryItemItemFactory
6863
* @param Iterator $iterator
6964
*/
7065
public function __construct(
71-
SourceItemCollectionFactory $sourceItemCollectionFactory,
7266
InventoryApiResponseInterfaceFactory $inventoryApiResponseFactory,
7367
InventoryItemInterfaceFactory $inventoryItemInterfaceFactory,
7468
InventoryItemItemInterfaceFactory $inventoryItemItemFactory,
7569
Iterator $iterator
7670
) {
77-
$this->sourceItemCollectionFactory = $sourceItemCollectionFactory;
7871
$this->inventoryApiResponseFactory = $inventoryApiResponseFactory;
7972
$this->inventoryItemFactory = $inventoryItemInterfaceFactory;
8073
$this->inventoryItemItemFactory = $inventoryItemItemFactory;
@@ -189,7 +182,7 @@ private function handleInventoryItems(array $stockData): array
189182
*/
190183
private function initCollection(): InventoryApiInterface
191184
{
192-
$this->sourceItemCollection = $this->sourceItemCollectionFactory->create();
185+
$this->sourceItemCollection = ObjectManager::getInstance()->create(SourceItemCollection::class);
193186

194187
return $this;
195188
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"php": ">7.0.1"
77
},
88
"type": "magento2-module",
9-
"version": "2.0.11",
9+
"version": "2.0.12",
1010
"autoload": {
1111
"files": [
1212
"registration.php"

etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22

33
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
4-
<module name="Emartech_Emarsys" setup_version="2.0.11">
4+
<module name="Emartech_Emarsys" setup_version="2.0.12">
55
<sequence>
66
<module name="Magento_Catalog" />
77
<module name="Magento_Inventory" />

0 commit comments

Comments
 (0)