Skip to content

Commit aa48201

Browse files
author
Oleksandr Dubovyk
committed
MAGETWO-66066: Remove usages of unserialize in module Magento/ImportExport
- Refactor
1 parent 062266e commit aa48201

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

app/code/Magento/ImportExport/Model/Import/AbstractEntity.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ abstract class AbstractEntity
278278
*
279279
* @var Json
280280
*/
281-
private $serializer;
281+
protected $serializer;
282282

283283
/**
284284
* @param \Magento\Framework\Stdlib\StringUtils $string
@@ -288,7 +288,6 @@ abstract class AbstractEntity
288288
* @param \Magento\Framework\App\ResourceConnection $resource
289289
* @param ProcessingErrorAggregatorInterface $errorAggregator
290290
* @param array $data
291-
* @param Json|null $json
292291
* @SuppressWarnings(PHPMD.NPathComplexity)
293292
*/
294293
public function __construct(

app/code/Magento/ImportExport/Test/Unit/Model/Import/EntityAbstractTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ protected function _getModelDependencies()
6060
$importFactory = $this->getMock(\Magento\ImportExport\Model\ImportFactory::class, [], [], '', false);
6161
$resourceHelper = $this->getMock(\Magento\ImportExport\Model\ResourceModel\Helper::class, [], [], '', false);
6262
$resource = $this->getMock(\Magento\Framework\App\ResourceConnection::class, [], [], '', false);
63-
$json = $this->getMock(\Magento\Framework\Serialize\Serializer\Json::class, [], [], '', false);
6463

6564
$data = [
6665
'coreString' => $string,
@@ -77,8 +76,7 @@ protected function _getModelDependencies()
7776
'max_data_size' => 1,
7877
'bunch_size' => 1,
7978
'collection_by_pages_iterator' => 'not_used',
80-
],
81-
'json' => $json,
79+
]
8280
];
8381

8482
return $data;

0 commit comments

Comments
 (0)