Skip to content

Commit

Permalink
IA-1241 (#56)
Browse files Browse the repository at this point in the history
Co-authored-by: Sanyi <sandor.deli-szabo@itgcommerce.com>
  • Loading branch information
oliverweisenburger and Sanyi authored Nov 23, 2023
1 parent de6175c commit 55416c2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Release notes:
==============

2.0.12
-------
* Fix
* Fixing error during installation on Magento Cloud


2.0.11
-------
* Fix
Expand Down
11 changes: 2 additions & 9 deletions Model/Api/InventoryApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
use Emartech\Emarsys\Api\Data\InventoryItemInterfaceFactory;
use Emartech\Emarsys\Api\Data\InventoryItemItemInterfaceFactory;
use Emartech\Emarsys\Api\InventoryApiInterface;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\Model\ResourceModel\Iterator;
use Magento\Inventory\Model\ResourceModel\SourceItem\Collection as SourceItemCollection;
use Magento\Inventory\Model\ResourceModel\SourceItem\CollectionFactory as SourceItemCollectionFactory;

/**
* Class InventoryApi
Expand All @@ -23,10 +23,6 @@
*/
class InventoryApi implements InventoryApiInterface
{
/**
* @var SourceItemCollectionFactory
*/
private $sourceItemCollectionFactory;

/**
* @var SourceItemCollection
Expand Down Expand Up @@ -61,20 +57,17 @@ class InventoryApi implements InventoryApiInterface
/**
* InventoryApi constructor.
*
* @param SourceItemCollectionFactory $sourceItemCollectionFactory
* @param InventoryApiResponseInterfaceFactory $inventoryApiResponseFactory
* @param InventoryItemInterfaceFactory $inventoryItemInterfaceFactory
* @param InventoryItemItemInterfaceFactory $inventoryItemItemFactory
* @param Iterator $iterator
*/
public function __construct(
SourceItemCollectionFactory $sourceItemCollectionFactory,
InventoryApiResponseInterfaceFactory $inventoryApiResponseFactory,
InventoryItemInterfaceFactory $inventoryItemInterfaceFactory,
InventoryItemItemInterfaceFactory $inventoryItemItemFactory,
Iterator $iterator
) {
$this->sourceItemCollectionFactory = $sourceItemCollectionFactory;
$this->inventoryApiResponseFactory = $inventoryApiResponseFactory;
$this->inventoryItemFactory = $inventoryItemInterfaceFactory;
$this->inventoryItemItemFactory = $inventoryItemItemFactory;
Expand Down Expand Up @@ -189,7 +182,7 @@ private function handleInventoryItems(array $stockData): array
*/
private function initCollection(): InventoryApiInterface
{
$this->sourceItemCollection = $this->sourceItemCollectionFactory->create();
$this->sourceItemCollection = ObjectManager::getInstance()->create(SourceItemCollection::class);

return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"php": ">7.0.1"
},
"type": "magento2-module",
"version": "2.0.11",
"version": "2.0.12",
"autoload": {
"files": [
"registration.php"
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>

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

0 comments on commit 55416c2

Please sign in to comment.