diff --git a/Helper/Data.php b/Helper/Data.php index 9364e1b..19d3c47 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -16,7 +16,7 @@ use Magento\Framework\App\Helper\AbstractHelper; use Magento\Framework\App\Helper\Context; use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Unserialize\Unserialize; +use Magento\Framework\Serialize\Serializer\Json; use Magento\Framework\UrlInterface; use Magento\Framework\Xml\Parser; use Magento\Store\Api\Data\StoreInterface; @@ -60,9 +60,9 @@ class Data extends AbstractHelper private $categoryRepository; /** - * @var Unserialize; + * @var \Magento\Framework\Serialize\Serializer\Json */ - private $unserialize; + private $json; /** * @var Parser @@ -93,14 +93,14 @@ public function __construct( CategoryRepositoryInterface $categoryRepository, StoreManagerInterface $storeManager, Parser $parser, - Unserialize $unserialize, + Json $json, DirectoryList $directoryList, Context $context ) { $this->categoryRepository = $categoryRepository; $this->storeManager = $storeManager; $this->parser = $parser; - $this->unserialize = $unserialize; + $this->json = $json; $this->directoryList = $directoryList; parent::__construct($context); } @@ -324,7 +324,7 @@ public function getGlamiCategory(array $productCategories) $this->logger($e->getMessage()); } - if ($categories = $this->unserialize->unserialize($categoriesConfigData)) { + if ($categories = $this->json->unserialize($categoriesConfigData)) { foreach ($categories as $category) { if (!empty($category['target']) && \in_array($category['source_id'], $productCategories, true)) { $glamiCategoryIds[] = $category['target']; diff --git a/Service/GenerateFeed.php b/Service/GenerateFeed.php index a9099eb..20ff19d 100644 --- a/Service/GenerateFeed.php +++ b/Service/GenerateFeed.php @@ -22,9 +22,6 @@ use Magento\Framework\Exception\NoSuchEntityException; use Magento\Framework\Filesystem\Io\File; use Magento\Framework\Simplexml\Element; -use Magento\InventorySalesApi\Api\AreProductsSalableInterface; -use Magento\InventorySalesApi\Api\Data\SalesChannelInterface; -use Magento\InventorySalesApi\Api\StockResolverInterface; use Magento\Store\Api\Data\StoreInterface; use Magento\Store\Model\StoreManagerInterface; use Symfony\Component\Console\Helper\ProgressBar;